File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ this=`basename $0`
20
20
usage () {
21
21
cat << EOF
22
22
Generate a changelog for the specified tag
23
- Usage: $this --reference <tag> [--remote <remote_name>]
23
+ Usage: $this --since <tag> [--remote <remote_name>]
24
24
25
25
Options:
26
26
--since specify the tag to start the changelog from (default: latest tag)
@@ -70,10 +70,15 @@ if [ -z "$REFERENCE" ]; then
70
70
fi
71
71
fi
72
72
73
+ SHA=$( git rev-parse ${VERSION} )
74
+ if [[ $? -ne 0 ]]; then
75
+ SHA=" HEAD"
76
+ fi
77
+
73
78
# Print the changelog
74
79
echo " ## Changelog"
75
80
echo " "
76
81
echo " ### Version $VERSION "
77
82
78
83
# Iterate over the commit messages and ignore the ones that start with "Merge" or "Bump"
79
- git log --pretty=format:" %s" $REFERENCE ..@ | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
84
+ git log --pretty=format:" %s" $REFERENCE ..$SHA | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
You can’t perform that action at this time.
0 commit comments