From ad531872fff794a4def1feaf422a45c292a67953 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 15 Jan 2014 15:47:35 -0800 Subject: [PATCH] Sort tags in semver order --- bin/make-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/make-release.sh b/bin/make-release.sh index 58f7ca8fc..b82723e38 100755 --- a/bin/make-release.sh +++ b/bin/make-release.sh @@ -160,8 +160,8 @@ gen_changelog() { PRETTY="- %s ([commit](https://github.com/Polymer/${RNAME}/commit/%h))" log "GEN CHANGELOG" "$REPO" - # find slightly older tag, sorted alphabetically - OLD_VERSION="`git tag -l | sort -n | tail -n 2 | head -n 1`" + # find slightly older tag, sorted semver style + OLD_VERSION="`git tag -l | sort -t. -k1,1n -k2,2n -k3,3n | tail -n 2 | head -n 1`" if [[ -n $OLD_VERSION ]]; then echo "#### ${RNAME}" >> "../../changelog.md" git log $OLD_VERSION..$VERSION --pretty="$PRETTY" >> "../../changelog.md"