Write and enforce the semver policy, per operator ruling on 1.0.60
1.0.60 removed public API (CultInspectorAssetPath) under a patch bump; its
own changelog says "Breaking" and the version number lied. Operator ruling:
semver is policy, strictly, for every published package family.
docs/semver-policy.md states what counts as breaking per surface (managed
API, Unity inspector attributes, CultCache wire format/store compatibility,
CultNet protocol, native bridge exports), the 0.y.z pre-1.0 convention, tag
naming, and required changelog shape. Records the 1.0.60 scar as history;
does not renumber it.
scripts/check-changelog-semver.mjs is the mechanical check: refuses a
changelog "### Breaking" section under too small a bump, and refuses a
version that skips, reverses, or repeats the previous published tag. Skips
re-litigating a version that is already tagged (rebuilding immutable
history is not a release action). Wired into publish-packages.yml for the
four npm/PyPI packages, and into build-unity-package.ps1 (cultlib),
packages/cultmath/scripts/build-unity-package.ps1 (cultmath), and a new
scripts/verify-caching-unity-release.ps1 (caching.unity has no build script
of its own to hook into).
18 node:test cases cover the required table (breaking+major/minor/patch,
non-breaking, 0.y.z, skip, downgrade) plus CLI-level git-tag resolution.
Hand-mutated each rule (bump classification, pre-1.0 lane requirement,
breaking-heading detection, breaking early-return, already-published skip)
and confirmed each kill, then restored byte-exact. No mutation harness is
committed; CultLib has none today.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 22:03:22 +02:00
|
|
|
# org.gamecult.caching.unity has no build step: it is pure C# editor source
|
|
|
|
|
# tagged directly from src/GameCult.Unity/Assets/Caching, unlike
|
|
|
|
|
# org.gamecult.cultlib and org.gamecult.cultmath which compile a DLL first.
|
|
|
|
|
# That means it has no existing script this repo's semver check can ride
|
|
|
|
|
# along with (docs/semver-policy.md, "Coverage gaps"). This script exists
|
|
|
|
|
# solely to be that gate: run it before tagging a caching-unity-v<version>
|
|
|
|
|
# release.
|
|
|
|
|
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
|
|
|
$packageRoot = Join-Path $repoRoot "src\GameCult.Unity\Assets\Caching"
|
|
|
|
|
$manifestPath = Join-Path $packageRoot "package.json"
|
|
|
|
|
|
|
|
|
|
$version = (Get-Content -LiteralPath $manifestPath -Raw | ConvertFrom-Json).version
|
|
|
|
|
|
2026-10-03 11:43:43 +02:00
|
|
|
# The suite pins the checker's rules and the declared tag prefixes, so it runs first.
|
|
|
|
|
& node --test (Join-Path $repoRoot "scripts\check-changelog-semver.test.mjs")
|
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
|
throw "The release check suite failed (scripts/check-changelog-semver.test.mjs); not releasing."
|
|
|
|
|
}
|
|
|
|
|
|
Write and enforce the semver policy, per operator ruling on 1.0.60
1.0.60 removed public API (CultInspectorAssetPath) under a patch bump; its
own changelog says "Breaking" and the version number lied. Operator ruling:
semver is policy, strictly, for every published package family.
docs/semver-policy.md states what counts as breaking per surface (managed
API, Unity inspector attributes, CultCache wire format/store compatibility,
CultNet protocol, native bridge exports), the 0.y.z pre-1.0 convention, tag
naming, and required changelog shape. Records the 1.0.60 scar as history;
does not renumber it.
scripts/check-changelog-semver.mjs is the mechanical check: refuses a
changelog "### Breaking" section under too small a bump, and refuses a
version that skips, reverses, or repeats the previous published tag. Skips
re-litigating a version that is already tagged (rebuilding immutable
history is not a release action). Wired into publish-packages.yml for the
four npm/PyPI packages, and into build-unity-package.ps1 (cultlib),
packages/cultmath/scripts/build-unity-package.ps1 (cultmath), and a new
scripts/verify-caching-unity-release.ps1 (caching.unity has no build script
of its own to hook into).
18 node:test cases cover the required table (breaking+major/minor/patch,
non-breaking, 0.y.z, skip, downgrade) plus CLI-level git-tag resolution.
Hand-mutated each rule (bump classification, pre-1.0 lane requirement,
breaking-heading detection, breaking early-return, already-published skip)
and confirmed each kill, then restored byte-exact. No mutation harness is
committed; CultLib has none today.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 22:03:22 +02:00
|
|
|
& node (Join-Path $repoRoot "scripts\check-changelog-semver.mjs") `
|
|
|
|
|
--package "org.gamecult.caching.unity" `
|
|
|
|
|
--version $version `
|
|
|
|
|
--cwd $repoRoot
|
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
|
throw "org.gamecult.caching.unity failed the semver policy check (see docs/semver-policy.md)."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host "org.gamecult.caching.unity $version cleared the semver policy check."
|