Nuxt/scripts/commits

33 lines
720 B
Plaintext
Raw Normal View History

2018-11-20 19:24:24 +00:00
#!/bin/bash
# https://git-scm.com/docs/pretty-formats
latestTag=`git describe | grep -oE "^[^-]+"`
2019-03-14 10:44:47 +00:00
rm commits.md
write() {
echo "$@"
echo "$@" >> commits.md
}
2019-03-14 12:16:34 +00:00
writeSection() {
write
write "## $1"
write
res=`echo "$3" | awk "/^$2(.*):/;" | grep ":" | grep -v "renovate" | sed -e 's/^/- /' | sort`
write "$res"
}
2019-03-14 10:44:47 +00:00
write "Comaparing $latestTag...dev"
2018-11-20 19:37:16 +00:00
2018-11-20 19:24:24 +00:00
diff=`git --no-pager log $latestTag...dev --pretty="%s (%an) (%h)"`
2019-03-14 12:16:34 +00:00
writeSection 'Features' 'feat' $diff
writeSection 'Fixes' 'fix' $diff
writeSection 'Refactors' 'refactor' $diff
writeSection 'Performance Improvements' 'perf' $diff
writeSection 'Examples' 'examples' $diff
writeSection 'Chore' 'chore' $diff
writeSection 'Tests' 'test' $diff