Skip to content

Instantly share code, notes, and snippets.

@sladg
Created October 14, 2022 14:30
Show Gist options
  • Save sladg/4c17e1934c91ed9ee326d67a824d9ff2 to your computer and use it in GitHub Desktop.
Save sladg/4c17e1934c91ed9ee326d67a824d9ff2 to your computer and use it in GitHub Desktop.
Changelog generator - easy from tags
#!/bin/bash
# Author: Jan Soukup
echo "CHANGELOG"
echo ----------------------
git tag | tr - \~ | sort -V --reverse | tr \~ - | 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