diff --git a/azure-pipelines/templates/release_version.yaml b/azure-pipelines/templates/release_version.yaml index dab5e934c..b16610f1c 100644 --- a/azure-pipelines/templates/release_version.yaml +++ b/azure-pipelines/templates/release_version.yaml @@ -7,6 +7,7 @@ steps: - script: | set -e branch="$(Build.SourceBranchName)" + echo Source branch is $branch latestRelease=false if [ "$branch" == "dev" ] ; then @@ -19,6 +20,12 @@ steps: echo "latest tag should also be pushed" latestRelease=true fi + elif [[ "$branch" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]] ; then + version=$([[ $branch =~ v(.*) ]] && echo "${BASH_REMATCH[1]}") + if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "latest tag should also be pushed" + latestRelease=true + fi else echo "Failed to extract version from branch $branch" exit 255