aboutsummaryrefslogtreecommitdiff
path: root/scripts/delta
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-02-05 07:48:18 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-02-05 10:46:28 +0100
commit5296abe3aff8b92efc7b1c214a6cf7531942b696 (patch)
tree619681aa74b1a2fd5ec7be3d5114a4a86b59bea4 /scripts/delta
parent671c48eb1a21a3a369575d4c3838545343a7def0 (diff)
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
Diffstat (limited to 'scripts/delta')
-rwxr-xr-xscripts/delta12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/delta b/scripts/delta
index bffa8e5c3..4b8a08915 100755
--- a/scripts/delta
+++ b/scripts/delta
@@ -30,10 +30,14 @@
$start = $ARGV[0];
-if($start eq "") {
+if($start eq "-h") {
print "Usage: summary [tag]\n";
exit;
}
+elsif($start eq "") {
+ $start = `git tag --sort=taggerdate | tail -1`;
+ chomp $start;
+}
$commits = `git log --oneline $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
$ncommitters = $acommitters - $bcommitters;
-# number of contributors right now (according to THANKS)
-$acontribs = `cat docs/THANKS | grep -c '^[^ ]'`;
+# number of contributors right now
+$acontribs = `./scripts/contrithanks.sh | grep -c '^[^ ]'`;
# number when the tag tag was set
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
# delta
@@ -118,7 +122,7 @@ printf "Commit authors: %d out of which %d are new (out of %d)\n",
$committers, $ncommitters, $acommitters;
printf "Contributors in RELEASE-NOTES: %d\n",
$numcontributors;
-printf "New contributors (in THANKS): %d (out of %d)\n",
+printf "New contributors: %d (out of %d)\n",
$contribs, $acontribs;
printf "New curl_easy_setopt() options: %d (out of %d)\n",
$nsetopts, $asetopts;