Hotfixes and maintenance branches
Sometimes main is on 1.5.0 and you need a fix for 1.4.x right now. A maintenance branch is a branch named release/<major>.<minor>.x (the pattern is maintenanceBranches, default release/*.x). On it the whole flow works as on main, but only for patches.
Create the branch
Section titled “Create the branch”git fetch --tagsnpx launchset hotfix 1.4Created release/1.4.x at v1.4.2 (88554b4) and pushed it.Next: git checkout release/1.4.x, then open PRs against it with patch changesets.The branch starts at the latest release tag in the 1.4 line. The command fails when the branch already exists or the line has no release. It needs push access (--token or GITHUB_TOKEN).
Fix, release
Section titled “Fix, release”- Branch from
release/1.4.x, make the fix and open a PR againstrelease/1.4.x. - Add a
patch(ornone) changeset.minorandmajorfail the PR check: the change belongs onmain. - Merge. The release workflow opens a release PR from the branch
launchset/release/release/1.4.x. - Merge the release PR. The build jobs run for the version, for example
1.4.3, which stays in the1.4.*line.
The generated workflows already listen to maintenance branches.
What is different on a maintenance branch
Section titled “What is different on a maintenance branch”- Docker tags. Templates with neither
{version}nor{minor}are dropped, which removeslatestand the major-only tag. A hotfix never moveslatestwhile a newer line exists. - npm. The
dist-tagoutput isrelease-1.4, notlatest. - GitHub Release. It is not marked “latest”.
- Build numbers. The default
timestampstrategy increases over time regardless of branch, so the hotfix Android build always gets a higherversionCodethan earlier uploads.
The changelog backport
Section titled “The changelog backport”After the release tag is created, launchset opens a PR to the base branch titled Changelog: v1.4.3. It only inserts the 1.4.3 section into main’s CHANGELOG.md, in the right place by version. It doesn’t touch version files or changesets. Merge it. The backport is a no-op when the section already exists, so re-running finalize is safe.
The fix must also reach main
Section titled “The fix must also reach main”The hotfix itself is not on main. Land it there through a normal PR with its own changeset. If you cherry-pick it, add a changeset in that PR too.
When main gets its next release, launchset skips versions that a hotfix took. Example: main is at 1.4.0 with a pending patch, v1.4.1 was released from release/1.4.x: the release PR on main is 1.4.2.
Previews on a maintenance branch
Section titled “Previews on a maintenance branch”Maintenance branches never auto-preview. Start Launchset preview by hand on the branch if you want one.