Skip to content

fix: guard release tag against workspace version mismatch - #61

Closed
Atishyy27 wants to merge 1 commit into
intuit:mainfrom
Atishyy27:fix/49-guard-release-version-vs-tag
Closed

fix: guard release tag against workspace version mismatch#61
Atishyy27 wants to merge 1 commit into
intuit:mainfrom
Atishyy27:fix/49-guard-release-version-vs-tag

Conversation

@Atishyy27

Copy link
Copy Markdown

Summary

Fixes #49.

release.sh takes the release tag as an arbitrary CLI arg and never checks it against [workspace.package].version in Cargo.toml. infigraph-cli's --version comes from clap's version field, which pulls CARGO_PKG_VERSION at compile time from that same Cargo.toml. So a forgotten version bump (or a typo in the tag arg) ships binaries whose --version output silently disagrees with the git tag/GitHub release they're uploaded under, with no way to fix it after the fact short of deleting the release — matching exactly what #49 reports (--version stuck on 3.2.6 across the v3.2.7 and v3.2.8 releases).

Guards by comparing the tag (v-prefix stripped) against the workspace version before any build starts, and fails with a clear message pointing at the fix in either direction.

Test plan

  • bash -n release.sh passes (syntax)
  • Tested the guard logic in isolation against this repo's real Cargo.toml (currently 3.2.15): a mismatched tag (v9.9.9) fails with the new error message and exit 1; a matching tag (v3.2.15) passes through cleanly
  • cargo test --all / cargo clippy — not applicable, this is a shell-only change, no Rust touched

Notes

Didn't run the full release build (requires cmake + a real GitHub release target), the change is isolated to the version-guard block before any build/upload step runs, so it can't affect build/package/upload behavior when the versions do match.

release.sh takes the release tag as an arbitrary CLI arg and never checks
it against [workspace.package].version in Cargo.toml. infigraph-cli's
--version comes from clap's version field, which pulls CARGO_PKG_VERSION
at compile time from that same Cargo.toml. So a forgotten version bump
(or a typo in the tag arg) ships binaries whose --version output silently
disagrees with the git tag/GitHub release they're uploaded under, with
no way to fix it after the fact short of deleting the release.

Guard by comparing the tag (v-prefix stripped) against the workspace
version before any build starts, and fail with a clear message pointing
at the fix in either direction.
@Atishyy27

Copy link
Copy Markdown
Author

Duplicate of #60, opened by mistake within minutes of it (an earlier session's work I didn't check for before re-diagnosing and re-fixing the same issue). Closing this one, #60 has the fix.

@Atishyy27 Atishyy27 closed this Aug 13, 2026
@Atishyy27
Atishyy27 deleted the fix/49-guard-release-version-vs-tag branch August 13, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

infigraph --version reports 3.2.6 in both v3.2.7 and v3.2.8 release binaries

1 participant