Skip to content

Commit 2bce3f4

Browse files
author
Matthew Fisher
committed
feat(contrib): add changelog script
This script assists in generating the changelog from one release to another. To retrieve the changelog from a specific tag to HEAD: $ ./generate-changelog.sh <tag> To retrieve the changelog from two different tags: $ ./generate-changelog.sh <from> <to>
1 parent f1229d2 commit 2bce3f4

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

contrib/util/generate-changelog.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
usage() {
4+
echo "Usage: $0 <from> [to]"
5+
}
6+
7+
retrieve() {
8+
git --no-pager log --oneline --no-merges --grep="$1" $FROM..$TO
9+
}
10+
11+
subheading() {
12+
echo "## $1\n"
13+
retrieve "$2"
14+
echo
15+
}
16+
17+
FROM=$1
18+
TO=${2:-"HEAD"}
19+
20+
if [ -z $1 ];
21+
then
22+
usage
23+
exit 1
24+
fi
25+
26+
echo "# $FROM -> $TO\n"
27+
28+
subheading "Features" "feat("
29+
subheading "Fixes" "fix("
30+
subheading "Documentation" "docs("

0 commit comments

Comments
 (0)