Semver check derives what callers used to declare: first release, tag prefix, changelog and measured set
The checker reads each package's tag prefix, changelog and assemblies directory from scripts/release-packages.mjs and derives the release record from git tags. A first release is the absence of any older tag in a checkout that holds other tags; a malformed same-prefix tag, a checkout without tags and an unreadable repository refuse. The measured set is every managed assembly (CLI header in the PE bytes) tracked at the previous tag at any depth; an unbuilt one is a break, a built assembly with no namesake is an addition. Deleted with their branches, refusals and tests: --first-release, --api-new, --tag-prefix, --changelog, --api-baseline-path and the workflow first-release decision line. Any unknown option is now a usage error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
133dd9f760
commit
23d7beac20
7 changed files with 514 additions and 322 deletions
|
|
@ -176,6 +176,8 @@ foreach ($assemblyName in $expectedAssemblies) {
|
|||
# the public API of every shipped assembly against the DLLs the previous cultlib-unity tag
|
||||
# tracked (read from git), so it runs here, once the assemblies under judgement exist. Every
|
||||
# tracked assembly the build does not hand over counts as removed, so all of them are handed over.
|
||||
# The package's tag prefix, changelog and assemblies directory are declared in
|
||||
# scripts/release-packages.mjs; this call passes only the version and the built assemblies.
|
||||
$measuredArguments = @()
|
||||
foreach ($assemblyName in $expectedAssemblies) {
|
||||
$measuredArguments += @("--api-built", $publishedByName[$assemblyName].FullName)
|
||||
|
|
@ -185,11 +187,8 @@ foreach ($refRoot in @($publishRoot, $quicPublishRoot, $webSocketPublishRoot)) {
|
|||
}
|
||||
& node (Join-Path $repoRoot "scripts\check-changelog-semver.mjs") `
|
||||
--package "org.gamecult.cultlib" `
|
||||
--changelog (Join-Path $templateRoot "CHANGELOG.md") `
|
||||
--version $unityPackageVersion `
|
||||
--tag-prefix "cultlib-unity" `
|
||||
--cwd $repoRoot `
|
||||
--api-baseline-path "unity/org.gamecult.cultlib/Runtime/Plugins" `
|
||||
@measuredArguments
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "CultLib Unity package failed the semver policy check (see docs/semver-policy.md)."
|
||||
|
|
|
|||
Loading…
Reference in a new issue