Last active
December 19, 2015 06:39
-
-
Save jtbonhomme/5912651 to your computer and use it in GitHub Desktop.
edit commits between current tag and last tag
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
#!/bin/bash | |
LAST_TAG=`git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags|tail -1` | |
echo "# CHANGELOG "$LAST_TAG > CHANGELOG.tmp; DELTA="" | |
for i in `git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags|tail -2` | |
do DELTA=$DELTA".."$i | |
done | |
DELTA=`echo $DELTA|sed 's/^..//g'` | |
echo "" >> CHANGELOG.tmp | |
echo "## Commits between $DELTA">> CHANGELOG.tmp | |
echo "" >> CHANGELOG.tmp | |
git log $DELTA --pretty=format:"* %s%d (%an - %ad)" --date=short >> CHANGELOG.tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment