From 63f0306c6c78d2a0534984df150ea6ea67a945eb Mon Sep 17 00:00:00 2001 From: "Gregory Markou (ai)" Date: Fri, 22 May 2026 18:33:34 -0400 Subject: [PATCH] chore(release): v0.3.1 and CI tag/version guardrail The v0.3.0 tag was placed on a commit that still had Cargo.toml at 0.2.3, so the updater shipped latest.json advertising 0.3.0 while the bundled binary reported 0.2.3 - every 0.2.3 client landed in an update loop because the "new" install reported the old version. Bump the workspace to 0.3.1 so installed_version == manifest_version once this tag ships, and add a CI step that fails the build whenever $GITHUB_REF_NAME disagrees with the workspace Cargo.toml version so the same mismatch can't ship again. Co-Authored-By: Claude --- .github/workflows/ci.yml | 16 ++++++++++++++++ Cargo.lock | 6 +++--- Cargo.toml | 2 +- crates/rompatch-gui/Cargo.toml | 2 +- crates/rompatch-gui/ui/package.json | 2 +- crates/rompatch/Cargo.toml | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04f6f24..d421db0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,22 @@ jobs: run: | cargo check -p rompatch-gui --release cargo clippy -p rompatch-gui --all-targets -- -D warnings + # Guard against a release whose binary version (Cargo.toml) doesn't + # match the git tag. The updater manifest below derives its version + # from $GITHUB_REF_NAME while the installed app reports its version + # from Cargo.toml - if they disagree, every client gets stuck in an + # update loop because the "new" binary still reports the old version. + - name: verify tag matches Cargo.toml workspace version + if: startsWith(github.ref, 'refs/tags/') + run: | + set -euo pipefail + TAG_VERSION="${GITHUB_REF_NAME#v}" + CARGO_VERSION=$(cargo metadata --no-deps --format-version 1 \ + | jq -r '.packages[] | select(.name=="rompatch-gui") | .version') + if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then + echo "::error::tag $GITHUB_REF_NAME (version $TAG_VERSION) does not match Cargo.toml ($CARGO_VERSION)" + exit 1 + fi # On tag pushes, produce a universal-apple-darwin .dmg. # `cargo-binstall` pulls prebuilt tauri-cli binaries instead of # building from source (~3-5 min saved per tagged release). diff --git a/Cargo.lock b/Cargo.lock index 4b4a05d..037b81f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2710,7 +2710,7 @@ dependencies = [ [[package]] name = "rompatch" -version = "0.2.3" +version = "0.3.1" dependencies = [ "lexopt", "rompatch-core", @@ -2718,7 +2718,7 @@ dependencies = [ [[package]] name = "rompatch-core" -version = "0.2.3" +version = "0.3.1" dependencies = [ "adler2", "bzip2-rs", @@ -2731,7 +2731,7 @@ dependencies = [ [[package]] name = "rompatch-gui" -version = "0.2.3" +version = "0.3.1" dependencies = [ "rompatch-core", "serde", diff --git a/Cargo.toml b/Cargo.toml index f330fe7..af7284e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["crates/rompatch-core", "crates/rompatch", "crates/rompatch-gui"] exclude = ["fuzz"] [workspace.package] -version = "0.2.3" +version = "0.3.1" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/GregTheGreek/rompatch-rs" diff --git a/crates/rompatch-gui/Cargo.toml b/crates/rompatch-gui/Cargo.toml index ecc74be..225706b 100644 --- a/crates/rompatch-gui/Cargo.toml +++ b/crates/rompatch-gui/Cargo.toml @@ -14,7 +14,7 @@ crate-type = ["rlib"] tauri-build = { version = "=2.6.1", features = [] } [dependencies] -rompatch-core = { version = "=0.2.3", path = "../rompatch-core", features = ["serde"] } +rompatch-core = { version = "=0.3.1", path = "../rompatch-core", features = ["serde"] } serde = { version = "=1.0.228", features = ["derive"] } serde_json = "=1.0.149" sha2 = "=0.10.9" diff --git a/crates/rompatch-gui/ui/package.json b/crates/rompatch-gui/ui/package.json index cf34d17..922f5d5 100644 --- a/crates/rompatch-gui/ui/package.json +++ b/crates/rompatch-gui/ui/package.json @@ -1,6 +1,6 @@ { "name": "rompatch-ui", - "version": "0.2.3", + "version": "0.3.1", "description": "React frontend for the rompatch native GUI", "private": true, "type": "module", diff --git a/crates/rompatch/Cargo.toml b/crates/rompatch/Cargo.toml index 51ef883..b2294d0 100644 --- a/crates/rompatch/Cargo.toml +++ b/crates/rompatch/Cargo.toml @@ -11,7 +11,7 @@ name = "rompatch" path = "src/main.rs" [dependencies] -rompatch-core = { path = "../rompatch-core", version = "0.2.3" } +rompatch-core = { path = "../rompatch-core", version = "0.3.1" } lexopt = "0.3" [lints]