Skip to content

Commit

Permalink
scripts: script to auto generate a change log file
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Satterwhite committed Apr 26, 2020
1 parent 51f8490 commit af278a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/user/bin/env bash
printf "# Changelog\n\n"
previous_tag=0

for current_tag in $(git tag --sort=creatordate)
do
if [ "$previous_tag" != 0 ];then
tag_date=$(git log -1 --pretty=format:'%ad' --date=short ${previous_tag})
printf "## ${previous_tag} (${tag_date})\n\n"
git log ${current_tag}...${previous_tag} --pretty=format:'* %s [View](https://github.com/esatterwhite/skyring/commit/%H)' | grep -v Merge
printf "\n\n"
fi
previous_tag=${current_tag}
done

0 comments on commit af278a3

Please sign in to comment.