From 4f2724543ac5b1cf4fcba161ee9ee56320c368aa Mon Sep 17 00:00:00 2001 From: Eric Satterwhite Date: Wed, 29 Apr 2020 16:46:48 -0500 Subject: [PATCH] scripts: fix change log script The ordering was incorrect. forces most recent commits first --- scripts/changelog.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/changelog.sh b/scripts/changelog.sh index 1cf0f5e2..d62c3e6b 100755 --- a/scripts/changelog.sh +++ b/scripts/changelog.sh @@ -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