| 1 |
#!/bin/sh |
| 2 |
#*************************************************************************** |
| 3 |
# _ _ ____ _ |
| 4 |
# Project ___| | | | _ \| | |
| 5 |
# / __| | | | |_) | | |
| 6 |
# | (__| |_| | _ <| |___ |
| 7 |
# \___|\___/|_| \_\_____| |
| 8 |
# |
| 9 |
# Copyright (C) 2013-2020, Daniel Stenberg, <[email protected]>, et al. |
| 10 |
# |
| 11 |
# This software is licensed as described in the file COPYING, which |
| 12 |
# you should have received as part of this distribution. The terms |
| 13 |
# are also available at https://curl.haxx.se/docs/copyright.html. |
| 14 |
# |
| 15 |
# You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 16 |
# copies of the Software, and permit persons to whom the Software is |
| 17 |
# furnished to do so, under the terms of the COPYING file. |
| 18 |
# |
| 19 |
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 20 |
# KIND, either express or implied. |
| 21 |
# |
| 22 |
########################################################################### |
| 23 |
|
| 24 |
# |
| 25 |
# This script shows all mentioned contributors from the given <hash>/<tag> |
| 26 |
# until HEAD and adds the contributors already mentioned in the existing |
| 27 |
# RELEASE-NOTES. |
| 28 |
# |
| 29 |
|
| 30 |
start=$1 |
| 31 |
|
| 32 |
if test "$start" = "-h"; then |
| 33 |
echo "Usage: $0 <since this tag/hash> [--releasenotes]" |
| 34 |
exit |
| 35 |
fi |
| 36 |
if test -z "$start"; then |
| 37 |
start=`git tag --sort=taggerdate | tail -1`; |
| 38 |
echo "Since $start:" |
| 39 |
fi |
| 40 |
|
| 41 |
# We also include curl-www if possible. Override by setting CURLWWW |
| 42 |
if [ -z "$CURLWWW" ] ; then |
| 43 |
CURLWWW=../curl-www |
| 44 |
fi |
| 45 |
|
| 46 |
# filter out Author:, Commit: and *by: lines |
| 47 |
# cut off the email parts |
| 48 |
# split list of names at comma |
| 49 |
# split list of names at " and " |
| 50 |
# cut off spaces first and last on the line |
| 51 |
# filter alternatives through THANKS-filter |
| 52 |
# only count names with a space (ie more than one word) |
| 53 |
# sort all unique names |
| 54 |
# awk them into RELEASE-NOTES format |
| 55 |
|
| 56 |
( |
| 57 |
( |
| 58 |
git log --pretty=full --use-mailmap $start..HEAD |
| 59 |
if [ -d "$CURLWWW" ] |
| 60 |
then |
| 61 |
git -C ../curl-www log --pretty=full --use-mailmap $start..HEAD |
| 62 |
fi |
| 63 |
) | \ |
| 64 |
egrep -ai '(^Author|^Commit|by):' | \ |
| 65 |
cut -d: -f2- | \ |
| 66 |
cut '-d(' -f1 | \ |
| 67 |
cut '-d<' -f1 | \ |
| 68 |
tr , '\012' | \ |
| 69 |
sed 's/ at github/ on github/' | \ |
| 70 |
sed 's/ and /\n/' | \ |
| 71 |
sed -e 's/^ //' -e 's/ $//g' -e 's/@users.noreply.github.com$/ on github/' |
| 72 |
|
| 73 |
grep -a "^ [^ \(]" RELEASE-NOTES| \ |
| 74 |
sed 's/, */\n/g'| \ |
| 75 |
sed 's/^ *//' |
| 76 |
|
| 77 |
)| \ |
| 78 |
sed -f ./docs/THANKS-filter | \ |
| 79 |
grep -a ' ' | \ |
| 80 |
sort -fu | \ |
| 81 |
awk '{ |
| 82 |
num++; |
| 83 |
n = sprintf("%s%s%s,", n, length(n)?" ":"", $0); |
| 84 |
#print n; |
| 85 |
if(length(n) > 77) { |
| 86 |
printf(" %s\n", p); |
| 87 |
n=sprintf("%s,", $0); |
| 88 |
} |
| 89 |
p=n; |
| 90 |
|
| 91 |
} |
| 92 |
|
| 93 |
END { |
| 94 |
printf(" %s\n", p); |
| 95 |
printf(" (%d contributors)\n", num); |
| 96 |
} |
| 97 |
|
| 98 |
' |