Skip to content

Commit bd1abcd

Browse files
Merge branch 'sachinh-inject-code-editor-version' into 1.0
2 parents aba2b4e + 77e6dd3 commit bd1abcd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)