diff --git a/bin/publish b/bin/publish index a30030435..f93bcf492 100755 --- a/bin/publish +++ b/bin/publish @@ -42,7 +42,7 @@ function main() { # Add 'latest' tag only when TAG_NAME is the highest semantic tag local LATEST_TAG - LATEST_TAG="$(git tag | sort -r --version-sort)" + LATEST_TAG="$(git tag | sort -r --version-sort | head -1)" if [[ "${TAG_NAME}" == "${LATEST_TAG}" ]]; then TAGS+=('latest') fi