Bump cluster-ui package version after a release branch cut. Creates two PRs — one to drop the prerelease suffix on the release branch and one to increment the minor version on master.
Automate the two cluster-ui version bumps required after a release branch is created. This creates two PRs:
26.2.0-prerelease.0 → 26.2.0)26.2.0-prerelease.0 → 26.3.0-prerelease.0)The file to edit is pkg/ui/workspaces/cluster-ui/package.json (the "version" field).
Ask the user for:
26.2. This is the version that was just branched.REL-4280. Included in commit messages if provided.Fetch remote branches and confirm origin/release-{version} exists:
git fetch origin release-{version} --no-tags
If the branch does not exist, report the error and stop.
Read pkg/ui/workspaces/cluster-ui/package.json on both branches to verify
the current version matches the expected {major}.{minor}.0-prerelease.0 pattern:
git show origin/release-{version}:pkg/ui/workspaces/cluster-ui/package.json
git show origin/master:pkg/ui/workspaces/cluster-ui/package.json
If the version does not match expectations, warn the user and ask whether to proceed.
Show the user a summary of the two planned changes:
Release branch PR (targeting release-{version}):
package.json version: {version}.0-prerelease.0 → {version}.0
Master PR (targeting master):
package.json version: {version}.0-prerelease.0 → {next_version}.0-prerelease.0
Where {next_version} increments the minor: e.g., 26.2 → 26.3.
Get explicit confirmation before proceeding.
The cockroachdb/cockroach repo restricts branch creation, so branches must be
pushed to the user's personal fork. Identify the fork remote:
git remote -v
Look for a remote pointing to the user's fork (e.g., fork → kyle-a-wong/cockroach).
If no fork remote is found, ask the user which remote to use.
Use {fork} below to refer to the identified fork remote name, and {fork_owner}
for the GitHub username (e.g., kyle-a-wong).
git checkout -b bump-cluster-ui-{version} origin/release-{version}
Edit pkg/ui/workspaces/cluster-ui/package.json: change the "version" field
from "{version}.0-prerelease.0" to "{version}.0".
Commit with message: