File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,11 @@ 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- echo "$ MAJOR_MINOR"
40- if ! git branch --remote --contains $COMMIT_SHA origin/$MAJOR_MINOR ; then
41- echo "Tag $VERSION_NUM is not on the correct branch. Skipping release."
42- exit 78
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
4342 fi
4443 echo "Tag is from a valid branch."
4544
You can’t perform that action at this time.
0 commit comments