Update git-tag-compared-to-release.sh

This commit is contained in:
Mark McDonnell 2016-05-04 15:11:10 +01:00
parent e9c4d33474
commit 1ffe18b4f0
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@ latest_release=$(curl \
tag=$(git tag | tail -n 1)
# you might have an issue where numbers are:
# 10, 1, 2, 3, 4, 5, 6, 7, 8, 9
#
# so you need to sort the numbers first:
# tag=$(git tag | sort -g | tail -n 1)
if [ $tag -le $latest_release ]; then
echo 1 > status
echo "The latest tag ($tag) is less than, or equal to, the latest release ($latest_release) so no point in building a new release"