Skip to content

Commit 002d158

Browse files
committed
fix version parsing's reliance on a loose glob
1 parent e173704 commit 002d158

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

azure/templates/deploy-service.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ steps:
131131
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
132132
export RELEASE_RELEASEID=$(Build.BuildId)
133133
134-
if [[ $SERVICE_ARTIFACT_NAME == v* ]]; then
135-
export DEPLOYED_VERSION=`echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" | tail -1`
134+
ASSUMED_VERSION==$(echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" | tail -1")
135+
if [[ ! -z $ASSUMED_VERSION ]]; then
136+
export DEPLOYED_VERSION=$ASSUMED_VERSION
136137
else
137138
export DEPLOYED_VERSION="${{ parameters.fully_qualified_service_name }}"
138139
fi

0 commit comments

Comments
 (0)