diff --git a/entrypoint.sh b/entrypoint.sh index 0fd313b..e4b0a15 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,7 +29,7 @@ NEXT_RELEASE=$(date "+${DATE_FORMAT}") # ColemanB - Script looks for tags meeting requirements # and then looks up hash. -LAST_RELEASE=$(git tag |grep "^20[^\-]*$" |sort -r |head -n 1) +LAST_RELEASE=$(git tag --sort=v:refname |grep "^20[^\-]*$" |tail -n 1) echo "Last release : ${LAST_RELEASE}" LAST_HASH="$(git show-ref -s "${LAST_RELEASE}")"