File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,13 @@ jobs:
3434 echo "Tag $VERSION_NUM follows valid semantic version pattern"
3535
3636 # Verify release tag is made on the correct major.minor version branch.
37- # The command will fail with exit code 1 if the tag is not on a valid release branch.
3837 MAJOR_MINOR=$(echo "$VERSION_NUM" | cut -d'.' -f1,2)
39- git branch --remote --contains $COMMIT_SHA origin/$MAJOR_MINOR
40-
38+ BRANCH_CONTAINS_OUTPUT=$(git branch --remote --contains "$COMMIT_SHA" "origin/$MAJOR_MINOR")
39+ if [ -z "$BRANCH_CONTAINS_OUTPUT" ]; then
40+ echo "Tag $VERSION_NUM is not on the correct branch. Skipping release."
41+ exit 78
42+ fi
4143 echo "Tag is from a valid branch."
42- echo "test"
4344
4445 - name : Download sagemaker artifacts by commit ID
4546 run : |
You can’t perform that action at this time.
0 commit comments