Skip to content

Commit b637369

Browse files
shanselmanCopilot
andcommitted
docs: clarify release versioning checks
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8bf605c commit b637369

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

docs/RELEASING.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ build/sign/publish release artifacts.
4646
--limit 10
4747
```
4848

49-
5. Confirm the GitHub release is a prerelease and not latest for alpha tags.
49+
5. Confirm the workflow used the exact tag SemVer. Tagged builds fail before
50+
publishing if GitVersion disagrees with the tag name.
51+
52+
```powershell
53+
$version = $tag -replace '^v', ''
54+
.\scripts\Get-OpenClawVersion.ps1 -Variable SemVer
55+
# Expected: $version
56+
```
57+
58+
6. Confirm the GitHub release is a prerelease and not latest for alpha tags.
5059

5160
```powershell
5261
gh release view $tag --repo openclaw/openclaw-windows-node `
@@ -217,5 +226,8 @@ Only tag when `HEAD == origin/master`.
217226
- Do not add csproj `<Version>` release fallbacks; product versions come from
218227
GitVersion/tag history.
219228
- Release versions come from the tag (`vX.Y.Z` or `vX.Y.Z-alpha.N`).
229+
- Untagged `master` builds are prerelease builds. After `vX.Y.Z-alpha.N`, an
230+
untagged commit may resolve to the next alpha prerelease, for example
231+
`X.Y.Z-alpha.(N+1)`.
220232
- CI computes GitVersion outputs for artifact naming, while product builds use
221233
GitVersion-backed assembly metadata.

docs/VERSIONING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ imports GitVersion through `src\Directory.Build.props`, so normal `dotnet build`
1515
`.\build.ps1`, `.\run-app-local.ps1`, and CI builds all derive assembly metadata
1616
from the same tag history.
1717

18+
## Tagged and untagged builds
19+
20+
Tagged releases must resolve to the exact tag SemVer:
21+
22+
- `vX.Y.Z` -> `X.Y.Z`
23+
- `vX.Y.Z-alpha.N` -> `X.Y.Z-alpha.N`
24+
25+
Untagged `master` checkouts are still prerelease builds. After an alpha tag,
26+
GitVersion advances to the next alpha prerelease until another tag pins the
27+
version. For example, after `v0.6.0-alpha.5`, an untagged commit on `master`
28+
may resolve to `0.6.0-alpha.6`.
29+
30+
`GitVersion.yml` intentionally gives the `master`/`main` branch the `alpha`
31+
label so alpha tags are treated as exact version sources. Do not remove that
32+
label unless the release train stops using alpha tags.
33+
1834
## Assembly metadata
1935

2036
GitVersion-derived builds set:
@@ -46,6 +62,11 @@ value that could hide drift.
4662
Release build jobs must check out full git history (`fetch-depth: 0`) so
4763
GitVersion can see tags.
4864

65+
Tagged CI runs verify that `github.ref_name` and GitVersion's `SemVer` output
66+
match before build artifacts are published. If a release tag is
67+
`v0.6.0-alpha.5`, CI must produce `0.6.0-alpha.5`; a derived value such as
68+
`0.6.0-alpha.6` or `0.6.0-712` is a release-blocking error.
69+
4970
## Local scripts
5071

5172
`scripts\Get-OpenClawVersion.ps1` uses the repository-local
@@ -68,6 +89,8 @@ For example:
6889
- Do not hardcode user-visible version strings like `vX.Y.Z` in active code or
6990
tests; use `AppVersionInfo`.
7091
- Keep release tags and `GitVersion.yml` as the versioning contract.
92+
- Keep `GitVersion.yml` configured so exact alpha tags resolve to their tag
93+
SemVer, and keep CI's tag/version verification enabled.
7194

7295
## References
7396

0 commit comments

Comments
 (0)