File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 22
33# Find the commit on master that last changed the root package.json version,
44# then submit a PR to merge that commit onto the release branch and release via nucleus
5+ # Optionally set WORK_ITEM env var to include in commit/PR title
56# Usage: yarn release:publish [branch=release]
7+ # Example: WORK_ITEM=W-1234567 yarn release:publish
68
79set -e
810
@@ -29,8 +31,12 @@ git switch -c "$BRANCH" "$VERSION_SHA"
2931git push origin HEAD
3032
3133if which gh > /dev/null; then
34+ PR_TITLE=" chore: release $VERSION "
35+ if [ -n " $WORK_ITEM " ]; then
36+ PR_TITLE+=" @$WORK_ITEM "
37+ fi
3238 # Use GitHub CLI to create a PR and wait for CI checks to pass
33- gh pr create -t " chore: release $VERSION " -B " $RELEASE_BRANCH " -b ' '
39+ gh pr create -t -B " $RELEASE_BRANCH " -b ' '
3440 # Clean up locally
3541 git switch " $BASE_BRANCH "
3642 git branch -D " $BRANCH "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Bump package versions for release and submit a PR on GitHub
4+ # Optionally set WORK_ITEM env var to include in commit/PR title
45# Usage: yarn release:version <version>
6+ # Example: WORK_ITEM=W-1234567 yarn release:version patch
57
68set -e
79
@@ -28,6 +30,9 @@ node "$(dirname "$0")/version.js" "$VERSION"
2830# Input could have been major/minor/patch; update the var to the resolved version
2931VERSION=$( jq -r .version package.json)
3032VERSION_BUMP_MESSAGE=" chore: bump version to $VERSION "
33+ if [ -n " $WORK_ITEM " ]; then
34+ VERSION_BUMP_MESSAGE+=" @$WORK_ITEM "
35+ fi
3136git commit -am " $VERSION_BUMP_MESSAGE "
3237git push origin HEAD
3338
You can’t perform that action at this time.
0 commit comments