Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,24 @@ One-time nuget.org setup: a Trusted Publisher policy for `Scrutor.Extensions.Htt
(owner `Chrison-dev`, repo `Scrutor.Extensions.HttpClient`, workflow `publish.yml`, environment
`nuget.org`) + repo variable `NUGET_USER`.

## Versioning — GitVersion, tag-driven

`GitVersion.yml` drives the version from `v*` tags. **Convention: MAJOR tracks the compatible
Scrutor major** — currently **7.x ↔ Scrutor 7.x** (the old 5.x line was Scrutor 5.x; 6.x was
skipped/never adopted). MINOR.PATCH is our own internal release counter. Cut a release by
tagging, e.g. `git tag v7.0.0 && git push origin v7.0.0`. Untagged builds fall back to the
static version in `Directory.Build.props`.

> **Note:** GitVersion only honours a version tag on `main` (feature branches get branch-name
> prerelease labels). Cut releases/prereleases by tagging `main` after the PR merges.
## Versioning — the version lives in `Directory.Build.props`

**The authoritative package version is the static `<Version>` in `Directory.Build.props`.** We do
**not** reference the `GitVersion.MsBuild` package, so CI packs exactly that value. (`GitVersion.yml`
+ the `GitVersion.Tool` CLI are kept for local inspection only.) This is a deliberate divergence
from the TVDB sibling: GitVersion in ContinuousDelivery mode won't emit a clean prerelease from a
tag — a prerelease tag like `v7.0.0-preview.1` becomes `7.0.0-<commitcount>` — and we want clean
`-preview.N` previews.

**Convention: MAJOR tracks the compatible Scrutor major** — currently **7.x ↔ Scrutor 7.x** (the
old 5.x line was Scrutor 5.x; 6.x was skipped/never adopted). MINOR.PATCH is our internal counter.

**Release process:**
1. Set `<Version>`/`<InformationalVersion>` in `Directory.Build.props` to the target
(e.g. `7.0.0-preview.1` for a preview, `7.0.0` for stable). Keep `AssemblyVersion`/`FileVersion`
numeric (`7.0.0.0`). Land it via PR.
2. Tag `main` to match and push: `git tag v7.0.0-preview.1 && git push origin v7.0.0-preview.1`.
The tag fires `publish.yml`; the version comes from the props, the tag names the GitHub Release.

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

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