delta: get contributors without changing THANKS
Give contrithanks.sh the option to send the list of names to stdout so that delta can use it appropriately for counting. Closes #16449
This commit is contained in:
parent
dfdd380844
commit
db2fd7c3de
@ -24,8 +24,7 @@
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# This script shows all mentioned contributors from <hash> until HEAD and
|
# This script updates the docs/THANKS document.
|
||||||
# puts them at the end of the THANKS document on stdout
|
|
||||||
#
|
#
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
@ -36,6 +35,13 @@ if test "$start" = "-h"; then
|
|||||||
echo "Usage: $0 <since this tag/hash>"
|
echo "Usage: $0 <since this tag/hash>"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if test "$start" = "stdout"; then
|
||||||
|
# output the names on stdout
|
||||||
|
use_stdout="yes"
|
||||||
|
start=""
|
||||||
|
else
|
||||||
|
use_stdout="no";
|
||||||
|
fi
|
||||||
if test -z "$start"; then
|
if test -z "$start"; then
|
||||||
start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1)
|
start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1)
|
||||||
fi
|
fi
|
||||||
@ -77,6 +83,8 @@ sed -f ./docs/THANKS-filter | \
|
|||||||
sort -fu | \
|
sort -fu | \
|
||||||
grep -aixvFf ./docs/THANKS >> $rand
|
grep -aixvFf ./docs/THANKS >> $rand
|
||||||
|
|
||||||
|
if test "$use_stdout" = "no"; then
|
||||||
|
|
||||||
# output header
|
# output header
|
||||||
cat <<EOF >./docs/THANKS
|
cat <<EOF >./docs/THANKS
|
||||||
This project has been alive for many years. Countless people have provided
|
This project has been alive for many years. Countless people have provided
|
||||||
@ -88,6 +96,10 @@ cat <<EOF >./docs/THANKS
|
|||||||
EOF
|
EOF
|
||||||
# append all the names, sorted case insensitively
|
# append all the names, sorted case insensitively
|
||||||
grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS
|
grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS
|
||||||
|
else
|
||||||
|
# send all names on stdout
|
||||||
|
grep -v "^ " $rand | sort -f $rand
|
||||||
|
fi
|
||||||
|
|
||||||
# get rid of the temp file
|
# get rid of the temp file
|
||||||
rm $rand
|
rm $rand
|
||||||
|
|||||||
@ -52,7 +52,7 @@ $acommitters = `git shortlog -s | wc -l`;
|
|||||||
$ncommitters = $acommitters - $bcommitters;
|
$ncommitters = $acommitters - $bcommitters;
|
||||||
|
|
||||||
# number of contributors right now
|
# number of contributors right now
|
||||||
$acontribs = `./scripts/contrithanks.sh | grep -c '^[^ ]'`;
|
$acontribs = `./scripts/contrithanks.sh stdout | wc -l`;
|
||||||
# number when the tag was set
|
# number when the tag was set
|
||||||
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
|
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
|
||||||
# delta
|
# delta
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user