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
22
.github/workflows/publish-packages.yml
vendored
22
.github/workflows/publish-packages.yml
vendored
|
|
@ -75,17 +75,7 @@ jobs:
|
|||
if: startsWith(github.ref, 'refs/tags/cultcache-ts-v')
|
||||
run: |
|
||||
tagged="${GITHUB_REF_NAME#cultcache-ts-v}"
|
||||
# The package's first release carries --first-release. The checker believes it only
|
||||
# when no other cultcache-ts tag exists, so this test only avoids refusing the
|
||||
# releases that follow; it does not decide anything.
|
||||
first=""
|
||||
if [ -z "$(git tag -l 'cultcache-ts-v*' | grep -vxF "$GITHUB_REF_NAME" || true)" ]; then first="--first-release"; fi
|
||||
node scripts/check-changelog-semver.mjs \
|
||||
--package "@gamecult/cultcache-ts" \
|
||||
--changelog packages/cultcache-ts/CHANGELOG.md \
|
||||
--version "$tagged" \
|
||||
--tag-prefix cultcache-ts \
|
||||
$first
|
||||
node scripts/check-changelog-semver.mjs --package "@gamecult/cultcache-ts" --version "$tagged"
|
||||
|
||||
- name: Build and test
|
||||
working-directory: packages/cultcache-ts
|
||||
|
|
@ -165,15 +155,7 @@ jobs:
|
|||
if: steps.selected.outputs.run == 'true' && startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
tagged="${GITHUB_REF_NAME#${{ matrix.package }}-v}"
|
||||
# See the cultcache-ts job: the checker, not this test, decides whether a first release is real.
|
||||
first=""
|
||||
if [ -z "$(git tag -l '${{ matrix.package }}-v*' | grep -vxF "$GITHUB_REF_NAME" || true)" ]; then first="--first-release"; fi
|
||||
node scripts/check-changelog-semver.mjs \
|
||||
--package "${{ matrix.package }}" \
|
||||
--changelog packages/${{ matrix.package }}/CHANGELOG.md \
|
||||
--version "$tagged" \
|
||||
--tag-prefix "${{ matrix.package }}" \
|
||||
$first
|
||||
node scripts/check-changelog-semver.mjs --package "${{ matrix.package }}" --version "$tagged"
|
||||
|
||||
# Lower layers install from source so a release of one package is tested
|
||||
# against the sibling revision it was cut with, not whatever PyPI has.
|
||||
|
|
|
|||
Loading…
Reference in a new issue