Skip to content

Commit

Permalink
scripts: fix change log script
Browse files Browse the repository at this point in the history
The ordering was incorrect. forces most recent commits first
  • Loading branch information
esatterwhite committed Apr 29, 2020
1 parent d37c5e4 commit 4f27245
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env bash
printf "# Changelog\n\n"
previous_tag=0
for current_tag in $(git tag --sort=-creatordate)
do

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
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 4f27245

Please sign in to comment.