fix(version): source displayed version from CARGO_PKG_VERSION #212
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mapps-200-version-source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The footer and System Status page derived the displayed version from
git describe --tags(baked as APP_GIT_TAG). That value lags the real release:just create-releasebumps Cargo.toml/package.json first, but thevX.Y.Zgit tag is only created after the release PR merges, so a build cut right after a 0.3.0 bump still resolved tov0.2.0-N-gHASHand the footer showed "0.2". The OCI build also strips.git(.dockerignore), sogit describecannot run there at all.Source the displayed version from
CARGO_PKG_VERSION(Cargo.tomlversion, kept in lockstep with package.json), which is correct from the release commit onward and needs no git history in the build context. The commit hash continues to carry exact build provenance. This also makes the footer consistent with the update banner, which already compares againstCARGO_PKG_VERSION.Document the full version-sourcing and staging-vs-production update-target logic in dev-docs/versioning.md and index it in dev-docs/README.md.
#MAPPS-200
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
build.rs emits `rerun-if-changed`/`rerun-if-env-changed` directives, which narrows cargo's build-script reruns to only the declared inputs plus a build-script recompile. The displayed version (APP_GIT_TAG) is read from `CARGO_PKG_VERSION`, but that was only re-baked on a version bump because the `env!("CARGO_PKG_VERSION")` fallback in the same file forces a recompile. That dependency is implicit and fragile: dropping the "redundant" fallback in a future cleanup would stop a version bump from re-running the script, leaving the footer stale (the MAPPS-200 symptom). Declare `cargo:rerun-if-env-changed=CARGO_PKG_VERSION` so the rerun is guaranteed regardless of the fallback. #MAPPS-200