Skip to content

Instantly share code, notes, and snippets.

@simofacc
Created April 7, 2016 07:38
Show Gist options
  • Save simofacc/480fc7986cf612f475a7a83ca8779225 to your computer and use it in GitHub Desktop.
Save simofacc/480fc7986cf612f475a7a83ca8779225 to your computer and use it in GitHub Desktop.
Github changelog generator
#!/bin/bash
# Author:Andrey Nikishaev
# Modified: Simon Facciol
echo "CHANGELOG"
echo ----------------------
git for-each-ref --sort=-taggerdate --format '%(tag)-%(*authordate)' refs/tags | grep 'release' | while read RES ; do
IFS='-' read -a arrRES <<< "${RES}"
TAG=${arrRES[0]}
DAT=${arrRES[1]}
echo
if [ $NEXT ];then
echo [$NEXT] - $DAT
else
echo "[Current]" - $DAT
fi
GIT_PAGER=cat git log --no-merges --author="Simon Facciol" --format=" * %s" $TAG..$NEXT
NEXT=$TAG
done
#FIRST=$(git tag -l | head -1)
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment