Created
April 3, 2017 11:37
-
-
Save tricinel/b4f74e7875b632d0bd1cd8e81c50a462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
filename='NOTES.md' | |
format=' | |
r=%(refname) | |
currenttag=${r#refs/tags/} | |
prevtag=$(git describe --always --tags --abbrev=0 ${currenttag}^) | |
changes=$(git log --no-walk ${prevtag}...${currenttag} --pretty=format:"* %s" | awk "!(/Bump/ || /Merge/ || /Build/ || /Release/ || /#nochangelog/)") | |
echo -e "###${currenttag}\n___\n\n${changes}\n\n$(cat ${filename})" > ${filename} | |
' | |
echo -e "###${currenttag}\n___\n\n${changes}\n\n" > ${filename} | |
echo "----> Creating release notes in ${filename}." | |
eval=`git for-each-ref --shell --format="$format" \ | |
--sort='*objecttype' \ | |
--sort=taggerdate \ | |
refs/tags` | |
eval "$eval" | |
echo "----> Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment