Skip to content

Commit 0a7c204

Browse files
committed
docs: standardize release branch naming and terminology
Replace freeform "hotfix" terminology with structured "release branch" naming (`release/<major.minor>`) across docs and CI. Distinguishes hotfix-from-latest vs maintenance-patch scenarios in PUBLISHING.md.
1 parent e2b1065 commit 0a7c204

4 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
gh pr create --base main --head "$BRANCH" \
356356
--title "Merge version bumps from ${BRANCH}" \
357357
--body "$(cat <<'EOF'
358-
Auto-created after hotfix publish from `'"${BRANCH}"'`.
358+
Auto-created after release branch publish from `'"${BRANCH}"'`.
359359
360360
Merges version bump commits back to main to prevent version collisions on the next regular release.
361361

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ You **don't need** a changeset for:
103103

104104
- Changesets are optional - maintainers can add them later if needed
105105
- Multiple changesets can exist for separate changes
106-
- For **hotfix releases** (urgent patches while unrelated changesets are pending on `main`), maintainers use release branches — see [PUBLISHING.md](./PUBLISHING.md#hotfix-release) for details
106+
- For **release branches** (urgent patches while unrelated changesets are pending on `main`, or maintenance patches on older minors), see [PUBLISHING.md](./PUBLISHING.md#release-branches) for details
107107
- See [PUBLISHING.md](./PUBLISHING.md) for full release process details
108108

109109
# Creating a Pull Request

PUBLISHING.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When a dependency is bumped (e.g., the SDK), dependent packages automatically re
1919
| Type | npm Tag | Trigger |
2020
|------|---------|---------|
2121
| **Stable** | `@latest` | Merge version PR on `main` |
22-
| **Hotfix** | `@latest` or `@release-X.Y` | Push to `release/**` branch |
22+
| **Release Branch** | `@latest` or `@release-X.Y` | Push to `release/**` branch |
2323
| **Nightly** | `@nightly` | Scheduled weekdays 2 AM UTC, or manual |
2424

2525
Publishing uses [npm OIDC trusted publishers](https://docs.npmjs.com/trusted-publishers) — no npm tokens are needed. Provenance attestations are generated automatically.
@@ -60,12 +60,19 @@ This is the normal release flow from `main`.
6060

6161
No manual tagging or workflow dispatch is needed.
6262

63-
## Hotfix Release
63+
## Release Branches
6464

65-
Use when you need to ship an urgent fix while unrelated changesets are pending on `main`, or when patching an older minor version.
65+
Use when you need to ship a fix independently of `main`. There are two scenarios:
66+
67+
1. **Hotfix from latest** — urgent patch while unrelated changesets are pending on `main`. Publishes to `@latest`.
68+
2. **Maintenance patch** — fix for an older minor version (e.g., patching `0.4.x` when `@latest` is `0.5.0`). Publishes to a scoped dist-tag like `@release-0.4`.
6669

6770
**Why:** Changesets consumes all pending changesets atomically — you can't release one package while holding others. Release branches let you version and publish independently of `main`.
6871

72+
Branch naming convention: `release/<major.minor>` (e.g., `release/0.5`). This is self-documenting and allows reuse for multiple patches to the same minor.
73+
74+
### Steps
75+
6976
1. **Find the tag to branch from:**
7077

7178
```bash
@@ -75,7 +82,11 @@ Use when you need to ship an urgent fix while unrelated changesets are pending o
7582
2. **Create a release branch:**
7683

7784
```bash
78-
git checkout -b release/fix-description @salesforce/b2c-cli@0.4.0
85+
# Hotfix from latest (e.g., latest is 0.5.0)
86+
git checkout -b release/0.5 @salesforce/b2c-cli@0.5.0
87+
88+
# Maintenance patch on older minor (e.g., latest is 0.5.0, patching 0.4.x)
89+
git checkout -b release/0.4 @salesforce/b2c-cli@0.4.2
7990
```
8091

8192
3. **Cherry-pick or apply the fix**, then create and consume a changeset:
@@ -90,18 +101,18 @@ Use when you need to ship an urgent fix while unrelated changesets are pending o
90101
4. **Push the branch:**
91102

92103
```bash
93-
git push -u origin release/fix-description
104+
git push -u origin release/0.5
94105
```
95106

96107
5. **Publishing happens automatically** — CI runs, and on success `publish.yml` triggers. No manual dispatch needed.
97108

98109
6. **Review the auto-created PR** that merges version bumps back to `main`. Merge it to prevent version collisions on the next regular release.
99110

100-
7. **Delete the release branch** after the merge-back PR is merged.
111+
7. **Delete the release branch** after the merge-back PR is merged (or keep it for future patches to the same minor).
101112

102113
### Older minor version patching
103114

104-
When the hotfix targets an older minor (e.g., `0.4.1` when `@latest` is `0.5.0`), the publish workflow automatically uses a scoped dist-tag (`release-0.4`) instead of `@latest`, preventing `@latest` from moving backward. Users install with:
115+
When the release branch targets an older minor (e.g., `0.4.3` when `@latest` is `0.5.0`), the publish workflow automatically uses a scoped dist-tag (`release-0.4`) instead of `@latest`, preventing `@latest` from moving backward. Users install with:
105116

106117
```bash
107118
npm install @salesforce/b2c-cli@release-0.4
@@ -141,7 +152,7 @@ The documentation site serves two versions:
141152
- **Stable** (root URL) — built from the most recent release tag (across all branches)
142153
- **Dev** (`/dev/`) — built from `main`, updated on every push
143154

144-
Stable docs are rebuilt after every stable or hotfix release. The `deploy-docs.yml` workflow finds the most recent release tag by creation date across all branches, so tags from hotfix release branches are picked up automatically.
155+
Stable docs are rebuilt after every stable or release branch publish. The `deploy-docs.yml` workflow finds the most recent release tag by creation date across all branches, so tags from release branches are picked up automatically.
145156

146157
## Local Testing
147158

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ This project uses [Changesets](https://github.com/changesets/changesets) for ver
174174
| Release Type | npm Tag | Trigger |
175175
|-------------|---------|---------|
176176
| **Stable** | `@latest` | Merge version PR on `main` |
177-
| **Hotfix** | `@latest` or `@release-X.Y` | Push to `release/**` branch |
177+
| **Release Branch** | `@latest` or `@release-X.Y` | Push to `release/**` branch |
178178
| **Nightly** | `@nightly` | Scheduled (weekdays) or manual |
179179

180-
For detailed information about the release process, including hotfix releases from release branches, see [PUBLISHING.md](./PUBLISHING.md).
180+
For detailed information about the release process, including release branches, see [PUBLISHING.md](./PUBLISHING.md).
181181

182182
### Quick Reference
183183

0 commit comments

Comments
 (0)