##v1.3.0
##v1.2.1
##v1.2.0
#!/bin/bash | |
# vim: set syntax=sh : | |
# | |
# Generate a changelog | |
# | |
git tag | sort -r | awk ' | |
/^v/ { | |
# print commit log diff | |
if(NR>1) | |
system("git log " $1 "..." prev " --pretty=format:\"- [%s](http://github.com/<owner>/<repo>/commit/%H) \" | tail -n+2") | |
# print tag header | |
print "\n\n##" $1; | |
prev=$1 | |
}' > CHANGELOG.md |
##v1.3.0
##v1.2.1
##v1.2.0
👍