Skip to content

Commit

Permalink
util/version: non-rc releases prioritized
Browse files Browse the repository at this point in the history
  • Loading branch information
radarsat1 committed May 8, 2019
1 parent 96d8eda commit f32bac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ else
BRANCH="$(git branch | grep \* | sed 's,[() *],,g')"
fi

LASTTAG="$(git tag -l | sort -rn | perl -nle 'print $_ if m/^\d+\.\d+(\.\d+)*(-rc)?$/' | head -n 1)"
LASTTAG="$(git tag -l | sed 's/\(.*\)/\1z/' | sort -rn | sed 's/z//' | perl -nle 'print $_ if m/^\d+\.\d+(\.\d+)*(rc)?$/' | head -n 1)"

if [ "$LASTTAG"x = x ]; then
LASTTAG="0"
INCREMENT="-0"
Expand Down

0 comments on commit f32bac7

Please sign in to comment.