Skip to content

Commit

Permalink
Sort tags in semver order
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Jan 15, 2014
1 parent 50a1b67 commit ad53187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ad53187

Please sign in to comment.