Skip to content

Commit 0313de3

Browse files
Keep releases trunk based
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 76bf167 commit 0313de3

5 files changed

Lines changed: 25 additions & 63 deletions

File tree

docs/content/get-started/module-bootstrap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ A module bootstrapped this way:
6060
## When to use this
6161

6262
- The module has no usable release yet, and the load-bearing core hasn't landed.
63-
- Use this only for the initial bootstrap. Once `main` has a first release, ongoing feature work targets `main` directly with ordinary topic branches, uses the [release branch pattern](../guides/versioning-and-releases.md#release-branch-pattern) to batch independent features, or uses a [stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests) when changes genuinely depend on each other.
63+
- Use this only for the initial bootstrap. Once `main` has a first release, ongoing feature work targets `main` directly with ordinary topic branches, or uses a [stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests) when changes genuinely depend on each other.
6464

6565
For the general branching and merge model, see [MSX Branching and Merging](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/).

docs/content/guides/versioning-and-releases.md

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -37,58 +37,20 @@ The label names are configurable through `Publish.Module.MajorLabels`, `MinorLab
3737

3838
## Branch types
3939

40-
- **Main (stable)** — publishes stable releases. A prerelease label publishes a prerelease from `main`.
41-
- **Development** — optional prerelease branch (for example `dev`). Each push publishes a prerelease.
42-
- **Feature branch** — optional feature branch. A prerelease label publishes a prerelease for testing.
43-
44-
Exactly one branch is authorized to publish stable releases, so consumers always have one unambiguous latest version.
45-
46-
## Release branch pattern
47-
48-
For a larger release made up of several independent features, use a release branch to
49-
collect the changes before promoting them to `main`. This is different from a
50-
[stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests),
51-
where each layer depends on the preceding layer.
52-
53-
Before creating the release branch, make sure the module repository's caller workflow
54-
triggers on it as well as `main`. The standard example filters pull requests to `main`:
55-
56-
```yaml
57-
on:
58-
pull_request:
59-
branches:
60-
- main
61-
- 'release/**'
62-
```
63-
64-
Then:
65-
66-
1. Cut a release branch such as `release/v1` from `main`.
67-
2. Open a draft release pull request from the release branch to `main`.
68-
3. Cut each independent feature branch from the release branch and open its pull request
69-
against the release branch.
70-
4. Merge feature pull requests into the release branch as they become ready. Use a
71-
[stack](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests)
72-
only when two features genuinely depend on each other.
73-
5. When the release branch is complete and all checks pass, mark the release pull request
74-
ready and merge it into `main`.
75-
76-
Pull requests targeting the release branch can publish preview versions when they carry
77-
the `Prerelease` label. Only the final merge into the repository's default branch can
78-
produce the stable release, because the workflow authorizes stable publication only when
79-
the merged pull request targets that branch.
80-
81-
Each feature pull request follows the
82-
[MSX PR Format](https://msx.no/docs/Ways-of-Working/PR-Format/) and closes its own
83-
scoped issue. The release pull request should summarize the combined user-facing
84-
release and link the included feature pull requests; it must not replace their
85-
issue-closing references with a second aggregate closure.
40+
- **Main (stable)** — the default branch and the only branch that publishes stable releases.
41+
- **Feature branch** — a short-lived topic branch with a pull request targeting `main`.
42+
43+
Exactly one branch is authorized to publish stable releases, so consumers always have one
44+
unambiguous latest version. Use a
45+
[stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests)
46+
when changes genuinely depend on each other; independent changes remain separate
47+
short-lived pull requests targeting `main`.
8648

8749
## Prereleases
8850

8951
A pull request labelled `Prerelease` publishes a prerelease version (for example `v1.2.3-pr.1.5`) that is installable
9052
but not promoted as latest. When that pull request is merged with a version label, the stable version is computed from
91-
the label and the current version on the release branch.
53+
the label and the current version on `main`.
9254

9355
When a pull request is closed without merging, the prerelease versions and tags created for it are removed, so
9456
abandoned work leaves no orphaned prereleases. This is controlled by `Publish.Module.AutoCleanup`.
@@ -108,8 +70,7 @@ Release names and notes can be generated from the pull request — see
10870

10971
Only a single linear ancestry of versions is maintained. Old versions are not patched: if a security issue is found on
11072
`2.1.3`, the fix ships on the latest version, not as a new `1.x` release. See
111-
[Principles and practices](../specification/principles-and-practices.md) for the reasoning and for the release-branch
112-
pattern used for larger efforts.
73+
[Principles and practices](../specification/principles-and-practices.md) for the reasoning.
11374

11475
## Related
11576

docs/content/reference/powershell-module-standard.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,12 @@ Keep related things together so the connection between code and its context is v
113113

114114
The release process treats each merged PR as a release on a single linear ancestry. There is no patching of older versions — security fixes go on the current tip of `main` only.
115115

116-
### Release and feature branches
116+
### Feature branches
117117

118-
For large work, follow the [release branch pattern](../guides/versioning-and-releases.md#release-branch-pattern):
119-
open a release branch and target it from feature branches. Apply the `Prerelease` label on
120-
the release branch PR to publish preview versions before the final merge to `main`.
118+
Keep feature branches short-lived and target `main` directly. Use a
119+
[stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests)
120+
only when changes genuinely depend on each other. Apply the `Prerelease` label to a
121+
feature pull request to publish a preview before merging it to `main`.
121122

122123
## CI/CD pipeline
123124

@@ -283,7 +284,7 @@ The publish step only runs when:
283284

284285
- All tests and code coverage pass (or are skipped)
285286
- The PR is merged to the default branch (stable release), or
286-
- The PR carries the `Prerelease` label (prerelease from the feature/release branch)
287+
- The PR carries the `Prerelease` label (prerelease from the feature branch)
287288

288289
On abandoned (closed without merge) PRs, the pipeline cleans up any prerelease tags created for that branch.
289290

docs/content/specification/principles-and-practices.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ back to patch and update old versions of the modules. This means that if we are
1212
patch the latest version with a fix, not releasing new versions based on older versions of the module, i.e. not updating the latest 1.x with the
1313
patch.
1414

15-
## Release and feature branches
15+
## Trunk-based development
1616

17-
If you need to work toward a bigger release, follow the [release branch pattern](../guides/versioning-and-releases.md#release-branch-pattern):
18-
create a branch representing the release and open a PR toward `main` for this branch.
19-
For each topic or feature to add to the release, open a new branch representing the feature (a feature branch) and open a PR towards the release
20-
branch. Optionally add the `Prerelease` label on the PR for the release branch, to release preview versions before merging and releasing a published
21-
version of the PowerShell module.
17+
Keep feature branches short-lived and open pull requests directly toward `main`.
18+
Independent changes use separate branches; use a
19+
[stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests)
20+
only when changes genuinely depend on each other. Add the `Prerelease` label to a
21+
feature pull request when a preview version is needed before merging to `main`.
2222

2323
## Colocation of concerns
2424

docs/content/specification/spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The pipeline MUST generate module documentation from the source (cmdlet help, RE
4343

4444
### FR5 — Support label-driven versioning and publication { #fr5 }
4545

46-
The pipeline MUST read pull-request labels (`Major`, `Minor`, `Patch`, `Prerelease`, `NoRelease`) to decide the semantic-version bump. It MUST compute the next version automatically, never reading or writing a hand-edited version file. A merge to the release branch MUST trigger publication to the PowerShell Gallery and documentation site; a prerelease label MUST result in a prerelease version available for testing before stable release.
46+
The pipeline MUST read pull-request labels (`Major`, `Minor`, `Patch`, `Prerelease`, `NoRelease`) to decide the semantic-version bump. It MUST compute the next version automatically, never reading or writing a hand-edited version file. A merge to the default branch MUST trigger publication to the PowerShell Gallery and documentation site; a prerelease label MUST result in a prerelease version available for testing before stable release.
4747

4848
### FR6 — Produce immutable, linkable releases { #fr6 }
4949

@@ -61,7 +61,7 @@ Only one release process MUST run against a given version of the codebase at a t
6161

6262
### NFR3 — Single production authority { #nfr3 }
6363

64-
Exactly one branch (typically `main`) MUST be authorized to publish stable releases. All other release branches MUST publish only prerelease versions. This ensures consumers have one unambiguous latest stable version.
64+
Exactly one branch (the repository default branch, typically `main`) MUST be authorized to publish stable releases. Feature branches MAY publish only prerelease versions. This ensures consumers have one unambiguous latest stable version.
6565

6666
### NFR4 — Rapid feedback on failure { #nfr4 }
6767

0 commit comments

Comments
 (0)