feat(release): single-source-of-truth version bumper + CI consistency gate#35
Merged
Conversation
… gate
Version strings lived in 5 places that drifted independently: desktop
npm manifest, landing npm manifest, tauri.conf.json, Cargo.toml, and
Cargo.lock. On top of that, the landing pages hardcoded "0.1.0" in
each `<Footer version=... />` call. Result: by the time desktop reached
0.1.4, the landing was still rendering "v0.1.0", and the latest.json
manifest's version disagreed with what the user saw on the page.
Changes:
- `scripts/bump-version.ts` — touches all 5 manifests atomically. Also
exposes `--check` (verify all agree) and `--check <semver>` (verify
all equal a given target). Validates semver, refuses to write if any
target's regex misses (catches manifest format drift).
- Root `package.json` scripts: `version:bump` and `version:check`.
- `packages/landing/src/lib/version.ts` — exports `APP_VERSION` read
from `packages/landing/package.json` at build time. Every landing
page now passes `<Footer version={APP_VERSION} />` instead of a
literal — so a `version:bump` automatically updates what the user
sees on the deployed site.
- `.github/workflows/release.yml` — new `verify-versions` job runs
before the build matrix. It pulls the tag, strips the `v`, and runs
`bump-version.ts --check <version>`. Any drift fails the workflow
before burning ~15 runner-minutes on a 3-platform Tauri build that
would publish mismatched artifacts.
- This commit also catches the existing drift up: landing package.json
bumped 0.1.0 → 0.1.4 to match the rest.
- `CONTRIBUTING.md` documents the new release flow.
Co-Authored-By: WOZCODE <contact@withwoz.com>
|
Landing preview will be available at https://bluemacaw.com/previews/pr-35/ once AWS infra lands (Plan D). |
The verify-versions job enforced tag==manifest equality unconditionally. On a workflow_dispatch dry-run the placeholder tag (v0.0.0-test) never matches the real manifest version, so the gate failed and skipped the whole build — defeating the "test-fire the pipeline" purpose of the manual trigger. Now: real `release` events still require every manifest to equal the tag; dry-runs only verify the manifests agree with each other and never block on a tag mismatch. Co-Authored-By: WOZCODE <contact@withwoz.com>
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.
Summary
Version strings lived in five places that drifted independently — desktop npm, landing npm,
tauri.conf.json,Cargo.toml,Cargo.lock— plus every landing page hardcoded<Footer version="0.1.0" />. By the time the desktop hit 0.1.4 the deployed landing was still rendering "v0.1.0" while thelatest.jsonmanifest said something else again.Changes
scripts/bump-version.ts— touches all 5 manifests atomically.bun run version:bump 0.2.0→ updates everywhere.bun run version:check→ verifies all agree (no arg) or all equal a given version.packages/landing/src/lib/version.ts— exportsAPP_VERSIONfrompackages/landing/package.json. All four landing pages now pass<Footer version={APP_VERSION} />instead of a literal, so a bump automatically updates what users see on the site..github/workflows/release.yml— newverify-versionsjob at the top of the workflow runsversion:bump --check <tag>against the release tag. Drift fails the workflow before burning ~15 runner-minutes producing mismatched artifacts.package.jsonbumped 0.1.0 → 0.1.4 to match.CONTRIBUTING.mddocuments the new release flow.Test plan
🧙 Built with WOZCODE