Skip to content

Commit 2da34cd

Browse files
committed
DOC: release_stats.sh script to report release stats
1 parent 804e48f commit 2da34cd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

release_stats.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
LAST=`git tag --sort v:refname | grep -v rc | tail -1`
4+
START=`git log $LAST.. --simplify-by-decoration --pretty="format:%ai %d" | tail -1 | gawk '{ print $1 }'`
5+
END=`git log $LAST.. --simplify-by-decoration --pretty="format:%ai %d" | head -1 | gawk '{ print $1 }'`
6+
7+
git log $LAST.. --format='%an#%s' | grep -v Merge > commits
8+
9+
# Include a summary by contributor in release notes:
10+
# cat commits | gawk -F '#' '{ print "- " $1 }' | sort | uniq
11+
12+
echo "Stats since <$LAST> [$START - $END]"
13+
echo ""
14+
15+
AUTHORS=`cat commits | gawk -F '#' '{ print $1 }' | sort | uniq | wc -l`
16+
echo "Number of authors: $AUTHORS"
17+
18+
TCOMMITS=`cat commits | gawk -F '#' '{ print $1 }'| wc -l`
19+
echo "Total commits : $TCOMMITS"
20+
21+
# Include a summary count of commits included in the release by contributor:
22+
# cat commits | gawk -F '#' '{ print $1 }' | sort | uniq -c | sort -nr
23+
24+
/bin/rm commits

0 commit comments

Comments
 (0)