mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
scripts: use last set tag if none given
Makes 'delta' and 'contributors.sh' easier to use. Make the delta script invoke contrithanks to get current number of contributors instead of counting THANKS, for accuracy. Closes #4881
This commit is contained in:
parent
671c48eb1a
commit
5296abe3af
@ -6,7 +6,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2013-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 2013-2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -29,10 +29,14 @@
|
|||||||
|
|
||||||
start=$1
|
start=$1
|
||||||
|
|
||||||
if test -z "$start"; then
|
if test "$start" = "-h"; then
|
||||||
echo "Usage: $0 <since this tag/hash> [--releasenotes]"
|
echo "Usage: $0 <since this tag/hash> [--releasenotes]"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if test -z "$start"; then
|
||||||
|
start=`git tag --sort=taggerdate | tail -1`;
|
||||||
|
echo "Since $start:"
|
||||||
|
fi
|
||||||
|
|
||||||
# filter out Author:, Commit: and *by: lines
|
# filter out Author:, Commit: and *by: lines
|
||||||
# cut off the email parts
|
# cut off the email parts
|
||||||
|
@ -30,10 +30,14 @@
|
|||||||
|
|
||||||
$start = $ARGV[0];
|
$start = $ARGV[0];
|
||||||
|
|
||||||
if($start eq "") {
|
if($start eq "-h") {
|
||||||
print "Usage: summary [tag]\n";
|
print "Usage: summary [tag]\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
elsif($start eq "") {
|
||||||
|
$start = `git tag --sort=taggerdate | tail -1`;
|
||||||
|
chomp $start;
|
||||||
|
}
|
||||||
|
|
||||||
$commits = `git log --oneline $start.. | wc -l`;
|
$commits = `git log --oneline $start.. | wc -l`;
|
||||||
$committers = `git shortlog -s $start.. | wc -l`;
|
$committers = `git shortlog -s $start.. | wc -l`;
|
||||||
@ -45,8 +49,8 @@ $acommitters = `git shortlog -s | wc -l`;
|
|||||||
# delta from now compared to before
|
# delta from now compared to before
|
||||||
$ncommitters = $acommitters - $bcommitters;
|
$ncommitters = $acommitters - $bcommitters;
|
||||||
|
|
||||||
# number of contributors right now (according to THANKS)
|
# number of contributors right now
|
||||||
$acontribs = `cat docs/THANKS | grep -c '^[^ ]'`;
|
$acontribs = `./scripts/contrithanks.sh | grep -c '^[^ ]'`;
|
||||||
# number when the tag tag was set
|
# number when the tag tag was set
|
||||||
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
|
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
|
||||||
# delta
|
# delta
|
||||||
@ -118,7 +122,7 @@ printf "Commit authors: %d out of which %d are new (out of %d)\n",
|
|||||||
$committers, $ncommitters, $acommitters;
|
$committers, $ncommitters, $acommitters;
|
||||||
printf "Contributors in RELEASE-NOTES: %d\n",
|
printf "Contributors in RELEASE-NOTES: %d\n",
|
||||||
$numcontributors;
|
$numcontributors;
|
||||||
printf "New contributors (in THANKS): %d (out of %d)\n",
|
printf "New contributors: %d (out of %d)\n",
|
||||||
$contribs, $acontribs;
|
$contribs, $acontribs;
|
||||||
printf "New curl_easy_setopt() options: %d (out of %d)\n",
|
printf "New curl_easy_setopt() options: %d (out of %d)\n",
|
||||||
$nsetopts, $asetopts;
|
$nsetopts, $asetopts;
|
||||||
|
Loading…
Reference in New Issue
Block a user