Skip to content

Commit e552216

Browse files
authored
Merge pull request #371 from devstress/copilot/fix-release-workflows
Fix release workflows failing on unmerged branches
2 parents efdf112 + 41aebe8 commit e552216

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/release-major.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ jobs:
8080
TARGET_VERSION="1.0.0"
8181
echo "Starting with version 1.0.0 from main branch"
8282
83+
set +e # Allow check_branch_merged to return non-zero without failing
8384
check_branch_merged "$TARGET_VERSION"
8485
result=$?
86+
set -e # Re-enable error exit
8587
8688
if [ $result -eq 0 ]; then
8789
# Branch exists and is merged - bump to next version
@@ -103,8 +105,10 @@ jobs:
103105
TARGET_VERSION="${NEW_MAJOR}.0.0"
104106
echo "Bumped version from $CURRENT to $TARGET_VERSION"
105107
108+
set +e # Allow check_branch_merged to return non-zero without failing
106109
check_branch_merged "$TARGET_VERSION"
107110
result=$?
111+
set -e # Re-enable error exit
108112
109113
if [ $result -eq 0 ]; then
110114
# Bumped version branch exists and is merged - bump again

.github/workflows/release-minor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ jobs:
8080
TARGET_VERSION="1.0.0"
8181
echo "Starting with version 1.0.0 from main branch"
8282
83+
set +e # Allow check_branch_merged to return non-zero without failing
8384
check_branch_merged "$TARGET_VERSION"
8485
result=$?
86+
set -e # Re-enable error exit
8587
8688
if [ $result -eq 0 ]; then
8789
# Branch exists and is merged - bump to next version
@@ -103,8 +105,10 @@ jobs:
103105
TARGET_VERSION="${MAJOR}.${NEW_MINOR}.0"
104106
echo "Bumped version from $CURRENT to $TARGET_VERSION"
105107
108+
set +e # Allow check_branch_merged to return non-zero without failing
106109
check_branch_merged "$TARGET_VERSION"
107110
result=$?
111+
set -e # Re-enable error exit
108112
109113
if [ $result -eq 0 ]; then
110114
# Bumped version branch exists and is merged - bump again

.github/workflows/release-patch.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ jobs:
8080
TARGET_VERSION="1.0.0"
8181
echo "Starting with version 1.0.0 from main branch"
8282
83+
set +e # Allow check_branch_merged to return non-zero without failing
8384
check_branch_merged "$TARGET_VERSION"
8485
result=$?
86+
set -e # Re-enable error exit
8587
8688
if [ $result -eq 0 ]; then
8789
# Branch exists and is merged - bump to next version
@@ -103,8 +105,10 @@ jobs:
103105
TARGET_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
104106
echo "Bumped version from $CURRENT to $TARGET_VERSION"
105107
108+
set +e # Allow check_branch_merged to return non-zero without failing
106109
check_branch_merged "$TARGET_VERSION"
107110
result=$?
111+
set -e # Re-enable error exit
108112
109113
if [ $result -eq 0 ]; then
110114
# Bumped version branch exists and is merged - bump again

0 commit comments

Comments
 (0)