Add script for generating changelog from git-notes
This commit is contained in:
parent
0249302e52
commit
2c1967d4fa
1 changed files with 16 additions and 0 deletions
16
scripts/gen-changelog
Normal file
16
scripts/gen-changelog
Normal file
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue