diff --git a/jenkins/scripts/run-docs.sh b/jenkins/scripts/run-docs.sh index 7cfff31586..ae0a263f12 100755 --- a/jenkins/scripts/run-docs.sh +++ b/jenkins/scripts/run-docs.sh @@ -40,7 +40,7 @@ elif echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null ; then # now all projects use semver based versions instead of date based # versions. The date versions will sort higher even though they # should not so we just special case it here. - LATEST=$(git tag | sed -n -e '/^20[0-9]\{2\}\..*$/d' -e '/^\([0-9]\+\.\?\)\{1,3\}.*$/p' | sort -V | tail -1) + LATEST=$(git tag | sed -n -e '/^20[0-9]\{2\}\..*$/d' -e '/^[0-9]\+\(\.[0-9]\+\)*$/p' | sort -V | tail -1) # Now publish to / and /$TAG if this is the latest version or # just /$TAG if this is not the latest version. if [ "$TAG" = "$LATEST" ] ; then