Skip to content

Commit e252f7b

Browse files
chore: set version to 7.0.0-preview.1 (validate publish pipeline) (#3)
Preview release to exercise the full publish.yml end-to-end (OIDC trusted publishing → nuget.org, GitHub Packages, GitHub Release). Documents that the version is authoritative in Directory.Build.props (no GitVersion.MsBuild) because GitVersion won't emit a clean prerelease from a tag. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5f39c7e commit e252f7b

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

‎CLAUDE.md‎

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,24 @@ One-time nuget.org setup: a Trusted Publisher policy for `Scrutor.Extensions.Htt
6161
(owner `Chrison-dev`, repo `Scrutor.Extensions.HttpClient`, workflow `publish.yml`, environment
6262
`nuget.org`) + repo variable `NUGET_USER`.
6363

64-
## Versioning — GitVersion, tag-driven
65-
66-
`GitVersion.yml` drives the version from `v*` tags. **Convention: MAJOR tracks the compatible
67-
Scrutor major** — currently **7.x ↔ Scrutor 7.x** (the old 5.x line was Scrutor 5.x; 6.x was
68-
skipped/never adopted). MINOR.PATCH is our own internal release counter. Cut a release by
69-
tagging, e.g. `git tag v7.0.0 && git push origin v7.0.0`. Untagged builds fall back to the
70-
static version in `Directory.Build.props`.
71-
72-
> **Note:** GitVersion only honours a version tag on `main` (feature branches get branch-name
73-
> prerelease labels). Cut releases/prereleases by tagging `main` after the PR merges.
64+
## Versioning — the version lives in `Directory.Build.props`
65+
66+
**The authoritative package version is the static `<Version>` in `Directory.Build.props`.** We do
67+
**not** reference the `GitVersion.MsBuild` package, so CI packs exactly that value. (`GitVersion.yml`
68+
+ the `GitVersion.Tool` CLI are kept for local inspection only.) This is a deliberate divergence
69+
from the TVDB sibling: GitVersion in ContinuousDelivery mode won't emit a clean prerelease from a
70+
tag — a prerelease tag like `v7.0.0-preview.1` becomes `7.0.0-<commitcount>` — and we want clean
71+
`-preview.N` previews.
72+
73+
**Convention: MAJOR tracks the compatible Scrutor major** — currently **7.x ↔ Scrutor 7.x** (the
74+
old 5.x line was Scrutor 5.x; 6.x was skipped/never adopted). MINOR.PATCH is our internal counter.
75+
76+
**Release process:**
77+
1. Set `<Version>`/`<InformationalVersion>` in `Directory.Build.props` to the target
78+
(e.g. `7.0.0-preview.1` for a preview, `7.0.0` for stable). Keep `AssemblyVersion`/`FileVersion`
79+
numeric (`7.0.0.0`). Land it via PR.
80+
2. Tag `main` to match and push: `git tag v7.0.0-preview.1 && git push origin v7.0.0-preview.1`.
81+
The tag fires `publish.yml`; the version comes from the props, the tag names the GitHub Release.
7482

7583
## Tests — spec-style, no Central Package Management
7684

‎Directory.Build.props‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
<PropertyGroup Label="GitVersion Integration">
1515
<!-- Enable GitVersion integration for local builds -->
1616
<EnableGitVersionTask Condition="'$(GITHUB_ACTIONS)' != 'true'">true</EnableGitVersionTask>
17-
<!-- Static fallback version when GitVersion is unavailable. See GitVersion.yml:
18-
MAJOR tracks the compatible Scrutor major (7.x ↔ Scrutor 7.x); MINOR.PATCH
19-
is our internal counter. -->
20-
<Version Condition="'$(GitVersion_FullSemVer)' == ''">7.0.0</Version>
17+
<!-- This is the AUTHORITATIVE package version on CI. We do NOT reference the
18+
GitVersion.MsBuild package, so $(GitVersion_*) stay empty and these values win
19+
(GitVersion.Tool is for local inspection only). Rationale: GitVersion won't emit
20+
a clean prerelease from a tag (in ContinuousDelivery mode a prerelease tag becomes
21+
`X.Y.Z-<commitcount>`), and we want clean `-preview.N` previews. Release process:
22+
set this to the target version, commit, then tag `v<that-version>` to publish.
23+
MAJOR tracks the compatible Scrutor major (7.x ↔ Scrutor 7.x); MINOR.PATCH is ours. -->
24+
<Version Condition="'$(GitVersion_FullSemVer)' == ''">7.0.0-preview.1</Version>
2125
<AssemblyVersion Condition="'$(GitVersion_AssemblySemVer)' == ''">7.0.0.0</AssemblyVersion>
2226
<FileVersion Condition="'$(GitVersion_AssemblySemVer)' == ''">7.0.0.0</FileVersion>
23-
<InformationalVersion Condition="'$(GitVersion_InformationalVersion)' == ''">7.0.0</InformationalVersion>
27+
<InformationalVersion Condition="'$(GitVersion_InformationalVersion)' == ''">7.0.0-preview.1</InformationalVersion>
2428
<!-- Use GitVersion values when available -->
2529
<Version Condition="'$(GitVersion_FullSemVer)' != ''">$(GitVersion_FullSemVer)</Version>
2630
<AssemblyVersion Condition="'$(GitVersion_AssemblySemVer)' != ''">$(GitVersion_AssemblySemVer)</AssemblyVersion>

0 commit comments

Comments
 (0)