feat(overlay-release): SemVer releases from conventional commits - #9
Merged
Conversation
…epo + prefix assumptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches the
overlay-releasereusable from CalVer (vYYYY.MM.DD.<run_number>) to SemVer derived from conventional-commit subjects since the last SemVer tag. This is Subsystem 1 of the console-owned overlay-pins effort (tag/SemVer-based releases the console will later promote).What changes
scripts/compute-next-semver.sh. pure, dependency-free bash. Reads commit subjects on stdin, takes the current version as an arg, prints the nextMAJOR.MINOR.PATCHor nothing. Bump mapping mirrors core'sauto-changeset.ymlexactly (verified against the real file):type!:/type(scope)!:→ major,feat→ minor,fix/perf/refactor→ patch, everything else ignored. Base-10 arithmetic is pinned so leading-zero segments never fall into octal.scripts/tests/compute-next-semver.test.sh. dependency-free harness (no bats/jq), runs the script as a subprocess and asserts stdout + exit code. 22/22 passing..github/workflows/scripts-ci.yml. runs those tests on PRs touchingscripts/**..github/workflows/overlay-release.yml. rewritten. On a caller's push to main it checks out the overlay (full history + tags), checks out this repo'sscripts/atgithub.job_workflow_sha(so script and workflow are always the same pinned version), finds the highest strict-SemVer tag (legacy CalVervYYYY.MM.DD.Ntags are excluded and left in place), and pipesgit log <lastTag>..HEAD --pretty=%sthrough the script to decide the next tag + GitHub Release. No-ops cleanly when nothing is release-worthy.Merge notes
Baseline
v0.1.0tags still need to be seeded on the 6 overlays to enable releases (they sit at package.json 0.1.0 with only CalVer tags today). As a safety net this PR makes the workflow no-op on any overlay that has no SemVer baseline tag, so merging before the baselines are seeded is inert, not dangerous . releases simply will not fire until a baseline exists. Thetag_prefixinput (defaultv),GITHUB_TOKENcontents:write auth, and thevars.RUNNER_LABELrunner are unchanged.Reviewed via a fresh whole-branch review (bump mapping confirmed against core, cross-repo checkout,
set -euo pipefail/ no-op safety, and the CalVer-exclusion filter all traced). Dry-run against real overlay history (b4m-libreoncology, b4m-bob) produced the expected results.