diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-03-23 19:39:47 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-05 09:37:17 +0200 |
commit | 2c1967d4fada24bde4f012540af07d1b7fb3a23d (patch) | |
tree | 29a22deb582a0d373f386d2ec045492e5e414be3 /scripts/gen-changelog | |
parent | 0249302e5218c2a0092ae573881c622adb1988d5 (diff) |
Add script for generating changelog from git-notes
Diffstat (limited to 'scripts/gen-changelog')
-rw-r--r-- | scripts/gen-changelog | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/gen-changelog b/scripts/gen-changelog new file mode 100644 index 00000000..3e947980 --- /dev/null +++ b/scripts/gen-changelog @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +since="$1" + +if [[ -z "$since" ]]; then + echo "Usage: $0 [since]" + exit 1 +fi + +for rev in $(git rev-list "$since"..HEAD | tac); do + if git notes --ref=changelog list $rev &> /dev/null; then + output=$(git notes --ref=changelog show $rev | sed '2,$s/^/ /') + echo "* $output" + fi +done + |