1
0
mirror of synced 2026-08-05 23:16:54 +00:00

devops: check branch bash (#1174)

This commit is contained in:
Yury Semikhatsky
2023-01-18 11:22:21 -08:00
committed by GitHub
parent 65624d6658
commit 1b1343649e
+5 -3
View File
@@ -6,11 +6,13 @@ pool:
steps:
- bash: |
echo "Can only publish from a release branch. Unexpected branch name: $CURRENT_BRANCH"
exit 1
if [[ ! "$CURRENT_BRANCH" =~ ^release-.* ]]; then
echo "Can only publish from a release branch."
echo "Unexpected branch name: $CURRENT_BRANCH"
exit 1
fi
env:
CURRENT_BRANCH: ${{ variables['Build.SourceBranchName'] }}
condition: ${{ not(startsWith(variables['Build.SourceBranchName'], 'release-')) }}
displayName: "Check the branch is a release branch"
- bash: |