File tree 1 file changed +35
-8
lines changed
1 file changed +35
-8
lines changed Original file line number Diff line number Diff line change 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
1
+ #! /bin/bash
2
+
3
+ while [[ $# > 1 ]]
4
+ do
5
+ key=" $1 "
6
+
7
+ case $key in
8
+ --from)
9
+ FROM=" $2 "
10
+ shift # past argument
11
+ ;;
12
+ --to)
13
+ TO=" $2 "
14
+ shift # past argument
15
+ ;;
16
+ * )
17
+ # unknown option
18
+ ;;
19
+ esac
20
+ shift # past argument or value
21
+ done
22
+
23
+ if [ -z " $FROM " ]; then
24
+ FROM=` git tag --sort v:refname | grep -v rc | tail -1`
25
+ fi
26
+
27
+ if [ -z " $TO " ]; then
28
+ TO=" "
29
+ fi
30
+
31
+ START=` git log $FROM .. --simplify-by-decoration --pretty=" format:%ai %d" | tail -1 | gawk ' { print $1 }' `
32
+ END=` git log $TO .. --simplify-by-decoration --pretty=" format:%ai %d" | head -1 | gawk ' { print $1 }' `
33
+
34
+ git log $FROM .. --format=' %an#%s' | grep -v Merge > commits
8
35
9
36
# Include a summary by contributor in release notes:
10
37
# cat commits | gawk -F '#' '{ print "- " $1 }' | sort | uniq
11
38
12
- echo " Stats since <$LAST > [$START - $END ]"
39
+ echo " Stats since <$FROM > [$START - $END ]"
13
40
echo " "
14
41
15
42
AUTHORS=` cat commits | gawk -F ' #' ' { print $1 }' | sort | uniq | wc -l`
You can’t perform that action at this time.
0 commit comments