CultLib/docs/nuget-packaging.md
Meta Vens 089859deb4 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

1 KiB

NuGet Packaging

See docs/semver-policy.md for what a version bump on these packages is required to mean and how a release is checked against that before it ships.

CultLib publishes the managed dependency graph as separate packages. The leaf package is GameCult.Mesh; its NuGet dependencies preserve the CultMesh, CultNet, and CultCache ownership boundaries.

powershell -ExecutionPolicy Bypass -File .\scripts\pack-nuget.ps1

The command creates a local feed under artifacts/nuget, verifies that every internal dependency package exists at the same version, then restores and runs a clean .NET consumer using only PackageReference Include="GameCult.Mesh".

The Unity distribution remains org.gamecult.cultlib, built by scripts/build-unity-package.ps1, because Unity consumes the managed assembly closure through UPM rather than NuGet restore.

Install the Unity package from the immutable release tag:

https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.57