#!/bin/bash # https://git-scm.com/docs/pretty-formats latestTag=`git describe | grep -oE "^[^-]+"` rm commits.md write() { echo "$@" echo "$@" >> commits.md } write "Comaparing $latestTag...dev" diff=`git --no-pager log $latestTag...dev --pretty="%s (%an) (%h)"` write write "## Features" write res=`echo "$diff" | awk '/feat/' | grep ":" | grep -v "renovate" | sed -e 's/^/- /' | sort` write "$res" write write "## Fixes" write res=`echo "$diff" | awk '!/feat/' | grep ":" | grep -v "renovate" | sed -e 's/^/- /' | sort` write "$res"