2013-10-07 15:47:03 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
2019-11-08 16:45:58 +08:00
|
|
|
# Copyright (C) 2013-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2013-10-07 15:47:03 +08:00
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
2016-02-03 07:19:02 +08:00
|
|
|
# are also available at https://curl.haxx.se/docs/copyright.html.
|
2013-10-07 15:47:03 +08:00
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
#
|
2016-04-22 21:53:42 +08:00
|
|
|
# This script shows all mentioned contributors from the given <hash>/<tag>
|
|
|
|
# until HEAD and adds the contributors already mentioned in the existing
|
|
|
|
# RELEASE-NOTES.
|
2014-11-06 18:03:06 +08:00
|
|
|
#
|
2013-10-07 15:47:03 +08:00
|
|
|
|
|
|
|
start=$1
|
|
|
|
|
|
|
|
if test -z "$start"; then
|
2015-04-20 16:15:31 +08:00
|
|
|
echo "Usage: $0 <since this tag/hash> [--releasenotes]"
|
|
|
|
exit
|
2013-10-07 15:47:03 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# filter out Author:, Commit: and *by: lines
|
|
|
|
# cut off the email parts
|
2014-09-12 21:12:06 +08:00
|
|
|
# split list of names at comma
|
2014-11-05 21:07:21 +08:00
|
|
|
# split list of names at " and "
|
2013-10-07 15:47:03 +08:00
|
|
|
# cut off spaces first and last on the line
|
2014-11-05 19:59:53 +08:00
|
|
|
# filter alternatives through THANKS-filter
|
2014-11-05 21:07:21 +08:00
|
|
|
# only count names with a space (ie more than one word)
|
2013-10-07 15:47:03 +08:00
|
|
|
# sort all unique names
|
2014-01-21 00:08:08 +08:00
|
|
|
# awk them into RELEASE-NOTES format
|
2014-11-06 18:03:06 +08:00
|
|
|
(
|
2019-11-08 16:45:58 +08:00
|
|
|
git log --pretty=full --use-mailmap $start..HEAD | \
|
2016-05-23 15:13:43 +08:00
|
|
|
egrep -ai '(^Author|^Commit|by):' | \
|
2013-10-07 15:47:03 +08:00
|
|
|
cut -d: -f2- | \
|
2017-01-21 00:10:08 +08:00
|
|
|
cut '-d(' -f1 | \
|
2013-10-07 15:47:03 +08:00
|
|
|
cut '-d<' -f1 | \
|
2014-09-12 21:12:06 +08:00
|
|
|
tr , '\012' | \
|
2018-05-14 14:52:41 +08:00
|
|
|
sed 's/ at github/ on github/' | \
|
2014-11-05 21:07:21 +08:00
|
|
|
sed 's/ and /\n/' | \
|
2016-05-23 14:42:12 +08:00
|
|
|
sed -e 's/^ //' -e 's/ $//g' -e 's/@users.noreply.github.com$/ on github/'
|
2014-11-06 18:03:06 +08:00
|
|
|
|
2016-05-23 15:13:43 +08:00
|
|
|
grep -a "^ [^ \(]" RELEASE-NOTES| \
|
2014-11-06 18:03:06 +08:00
|
|
|
sed 's/, */\n/g'| \
|
|
|
|
sed 's/^ *//'
|
2016-04-22 21:53:42 +08:00
|
|
|
|
2014-11-06 18:03:06 +08:00
|
|
|
)| \
|
2014-11-05 19:59:53 +08:00
|
|
|
sed -f ./docs/THANKS-filter | \
|
2016-05-23 15:13:43 +08:00
|
|
|
grep -a ' ' | \
|
2014-11-05 19:59:53 +08:00
|
|
|
sort -fu | \
|
2014-01-21 00:08:08 +08:00
|
|
|
awk '{
|
|
|
|
num++;
|
|
|
|
n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
|
|
|
|
#print n;
|
2016-02-10 20:49:42 +08:00
|
|
|
if(length(n) > 77) {
|
2014-01-21 00:08:08 +08:00
|
|
|
printf(" %s\n", p);
|
|
|
|
n=sprintf("%s,", $0);
|
|
|
|
}
|
|
|
|
p=n;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
printf(" %s\n", p);
|
|
|
|
printf(" (%d contributors)\n", num);
|
|
|
|
}
|
|
|
|
|
|
|
|
'
|