Nuxt/scripts/commits
2019-03-14 14:14:47 +03:30

29 lines
548 B
Bash
Executable File

#!/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"