Created
January 9, 2012 15:56
-
-
Save creotiv/1583550 to your computer and use it in GitHub Desktop.
Script for Git that generates changelog by tags
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 | |
# Author:Andrey Nikishaev, Gunnar Lindholm | |
echo "CHANGELOG" | |
echo ---------------------- | |
git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags |tac |grep -v '^$' | while read TAG ; do | |
echo | |
if [ $NEXT ];then | |
echo [$NEXT] | |
else | |
echo "[Current]" | |
fi | |
GIT_PAGER=cat git log --no-merges --format=" * %s" $TAG..$NEXT | |
NEXT=$TAG | |
done | |
FIRST=$(git tag -l | head -1) | |
echo | |
echo [$FIRST] | |
GIT_PAGER=cat git log --no-merges --format=" * %s" $FIRST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment