Skip to content

Commit

Permalink
change if
Browse files Browse the repository at this point in the history
  • Loading branch information
rmch91 committed Mar 1, 2024
1 parent a794d75 commit 30ff298
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/minor-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ jobs:
echo "RELEASE_BRANCH=$release_branch" >> $GITHUB_ENV
echo "Checking for existence of the branch: $release_branch"
branch_exists=$(git ls-remote --heads origin | awk '{print $2}' | grep "^refs/heads/$release_branch$")
if [ -n "$branch_exists" ]; then
echo "Error: Branch $release_branch already exists. Please check the branch before proceeding."
exit 1
else
echo "Branch $release_branch does not exist. Creating new one."
git checkout -b "$release_branch"
git checkout -b "$release_branch"

Expand Down

0 comments on commit 30ff298

Please sign in to comment.