Last active
June 18, 2018 12:49
-
-
Save lfalmeida/53e7528bd08c3fcc2da52fd50babfa65 to your computer and use it in GitHub Desktop.
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 | |
FORMAT='- %s ' | |
SUFFIX='homolog'; | |
echo "## CHANGELOG" | |
echo ---------------------- | |
git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | tac | grep -v '^$' | grep "${SUFFIX}" | while read TAG ; | |
do | |
echo -e "\n" | |
if [ $NEXT ];then | |
echo "### $NEXT ($(git tag -l --format='%(taggerdate:local)' $TAG))" | |
echo Release note: $(git tag -l --format='%(contents)' $TAG) | |
else | |
echo "### [RC]" | |
fi | |
GIT_PAGER=cat git log --no-merges --format="${FORMAT}" $TAG..$NEXT | |
NEXT=$TAG | |
done | |
FIRST=$(git tag -l | grep ${SUFFIX} | head -1) | |
echo -e "\n" | |
echo "### $FIRST ($(git tag -l --format='%(taggerdate:local)' $FIRST))" | |
echo Release note: $(git tag -l --format='%(contents)' $FIRST) | |
GIT_PAGER=cat git log --no-merges --format="${FORMAT}" $FIRST | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment