Skip to content

Instantly share code, notes, and snippets.

@johanneswseitz
Created February 1, 2013 16:24
Show Gist options
  • Save johanneswseitz/4692336 to your computer and use it in GitHub Desktop.
Save johanneswseitz/4692336 to your computer and use it in GitHub Desktop.
Generates a Changelog from the tags in a Git repository
#!/bin/sh
PREVIOUS="HEAD"
for TAG in `git tag | grep "\d*.\d*-build-\d*" | sort -r | head`
do
echo "========================"
echo "Changes in $PREVIOUS"
echo "========================"
CHANGES=`git log $TAG..$PREVIOUS --format=%B | grep "^TF:" | sed 's/TF:/-/g'`
if [[ -z $CHANGES ]]
then
echo "No significant changes"
else
echo "$CHANGES"
fi
echo ""
PREVIOUS=$TAG
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment