Last active
October 14, 2016 13:04
-
-
Save gilesdring/5eea5b39b41282be3345f64a6e77324f to your computer and use it in GitHub Desktop.
Automatically prepending to CHANGELOG.md
This file contains hidden or 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
#!/usr/bin/env bash | |
# Deal with case that we're on the initial commit | |
[[ $(git rev-parse HEAD) == $(git rev-list --max-parents=0 HEAD) ]] || PARENT="HEAD^.." | |
cat <(git log ${PARENT}HEAD --format=format:'# %s - %h - %ai%n%n%b%n') CHANGELOG.md > CHANGELOG.tmp | |
mv CHANGELOG.tmp CHANGELOG.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment