File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ VERSION_SHA=$(git blame -- package.json | grep '"version":' | cut -d' ' -f1)
2727VERSION=$( jq -r .version package.json)
2828
2929# Create a new branch with the changes to release
30- git switch -c " $BRANCH " " $VERSION_SHA "
31- git push origin HEAD
30+ git branch " $BRANCH " " $VERSION_SHA "
31+ git push -u origin " $BRANCH "
32+ git branch -D " $BRANCH "
33+
3234
3335if ! which gh > /dev/null; then
3436 # GitHub CLI not installed - clean up and prompt for manual branch creation
35- git switch " $BASE_BRANCH "
36- git branch -D " $BRANCH "
3737 echo " Open a PR: https://github.com/salesforce/lwc/pull/new/$BRANCH "
3838 exit 0
3939fi
@@ -44,14 +44,11 @@ if [ -n "$WORK_ITEM" ]; then
4444fi
4545# Use GitHub CLI to create a PR and wait for CI checks to pass
4646gh pr create -t " $PR_TITLE " -b ' ' -B " $RELEASE_BRANCH " -H " $BRANCH "
47- # Clean up locally
48- git switch " $BASE_BRANCH "
49- git branch -D " $BRANCH "
5047
5148# Wait for CI to complete
5249sleep 3 # Give GitHub time to kick off CI
5350. " $( dirname " $0 " ) /wait-for-pr.sh" " $BRANCH "
54- if ! gh pr checks --fail-fast --watch; then
51+ if ! gh pr checks " $BRANCH " --fail-fast --watch; then
5552 echo ' CI failed. Cannot continue with release.'
5653 gh pr view " $BRANCH " --web
5754 exit 1
Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ if ! gh >/dev/null; then
4444fi
4545
4646# Use GitHub CLI to create a PR and wait for it to be merged before exiting
47- gh pr create -t " $VERSION_BUMP_MESSAGE " -b ' '
48- gh pr merge --auto --squash --delete-branch
47+ gh pr create -t " $VERSION_BUMP_MESSAGE " -b ' ' -B " $BASE_BRANCH " -H " $BRANCH "
48+ # Squash on master, but not backports
49+ [ " $BASE_BRANCH " == ' master' ] && SQUASH=' --squash'
50+ gh pr merge --auto --delete-branch $SQUASH
4951git switch " $BASE_BRANCH "
5052git branch -D " $BRANCH "
5153
You can’t perform that action at this time.
0 commit comments