You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plans/2026-05-16-semantic-versioning-script.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,10 +175,22 @@ Base version rules:
175
175
| Branch/mode | Base version | Snapshot output example |
176
176
| --- | --- | --- |
177
177
|`main` / `snapshot`| next patch from latest stable |`1.4.8-snapshot.732.a1b2c3d4`|
178
-
| feature branch / `snapshot`| next patch from latest stable |`1.4.8-snapshot.feature-login.732.a1b2c3d4` if branch slug is enabled |
178
+
| feature branch / `snapshot`| next patch from latest stable, or MR target release line |`1.4.8-snapshot.feature-login.732.a1b2c3d4`|
179
+
| MR source branch targeting `release/1.5`| target release line from `CI_MERGE_REQUEST_TARGET_BRANCH_NAME`|`1.5.0-snapshot.feature-login.732.a1b2c3d4`|
179
180
|`release/1.5` / `snapshot`| target release line |`1.5.0-snapshot.732.a1b2c3d4`|
180
181
| after existing `1.5.0-rc.2`| next RC base without reserving it |`1.5.0-rc.3.snapshot.732.a1b2c3d4`|
181
182
183
+
Feature branch snapshot policy:
184
+
185
+
- Always include the sanitized source branch slug by default for readability and package cleanup.
186
+
- Use `CI_COMMIT_REF_SLUG` for normal branch pipelines.
187
+
- Use `CI_MERGE_REQUEST_SOURCE_BRANCH_NAME` or `CI_COMMIT_REF_SLUG` for MR source identity.
188
+
- If `CI_MERGE_REQUEST_TARGET_BRANCH_NAME` matches a release branch pattern such as `release/1.5`, use that target line as the base version.
189
+
- Otherwise, use the next patch after the latest stable module tag from the GitLab Tags API.
190
+
- Do not query branch reachability and do not fetch history; feature branch snapshots are not release lineage decisions.
191
+
- Publish to a snapshot/dev package channel keyed by module and branch slug, for example `snapshots/<module>/<branch-slug>/<version>`.
192
+
- Configure retention/cleanup on the snapshot channel; feature branch snapshots should disappear after merge or after a fixed TTL.
193
+
182
194
Important: if strict SemVer precedence matters, avoid publishing snapshots to the same channel as immutable releases/RCs. SemVer prerelease ordering can be surprising for mixed labels like `rc.3.snapshot.732`. The safest operational rule is: snapshots go to a snapshot/dev repository or package channel; releases and RCs go to release channels.
183
195
184
196
If the business requires per-module sequential snapshot numbers, do not derive that from Git tags. Use one of these explicit state stores instead:
0 commit comments