public
Authored by
Matt @mjc

Generate release notes for existing tags
Embed
Share
#!/bin/bash
previous_tag=""
for tag in $(git tag | sort -nr)
do
if [ "$previous_tag" == "" ]
then
previous_tag=$tag
continue
fi
echo -e "\n\n## $tag\n" >> ./RELEASE_NOTES.md
git log ${tag}..${previous_tag} | grep 'Date: ' -A2 | grep -Ev '^Date: ' | grep -Ev '^--' | grep -E '[a-z]' | sed -E 's/^\s+/ * /g' >> ./RELEASE_NOTES.md
previous_tag=$tag
done
Please register or sign in to comment