File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ steps:
131131 export SOURCE_COMMIT_ID=$(Build.SourceVersion)
132132 export RELEASE_RELEASEID=$(Build.BuildId)
133133
134- ASSUMED_VERSION=$( echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" | tail -1)
134+ export ASSUMED_VERSION=` echo $SERVICE_ARTIFACT_NAME | ( grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true ) | tail -1`
135135 if [[ ! -z $ASSUMED_VERSION ]]; then
136136 export DEPLOYED_VERSION=$ASSUMED_VERSION
137137 else
@@ -203,8 +203,9 @@ steps:
203203
204204 source $(SERVICE_DIR)/.build_env_vars
205205
206- if [[ $SERVICE_ARTIFACT_NAME == v* ]]; then
207- export DEPLOYED_VERSION=`echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" | tail -1`
206+ export ASSUMED_VERSION=`echo $SERVICE_ARTIFACT_NAME | ( grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true ) | tail -1`
207+ if [[ ! -z $ASSUMED_VERSION ]]; then
208+ export DEPLOYED_VERSION=$ASSUMED_VERSION
208209 else
209210 export DEPLOYED_VERSION="${{ parameters.fully_qualified_service_name }}"
210211 fi
You can’t perform that action at this time.
0 commit comments