Skip to content

v0.1.1 — correct commit in `version`

Latest

Choose a tag to compare

@g4lb g4lb released this 09 Sep 11:39
· 12 commits to main since this release

A patch release fixing two bugs in what version reports. No behaviour change anywhere else.

cargo install --locked autor3search-rust

Fixed

version said unknown when installed from crates.io. build.rs asked git for the commit, and a crate unpacked from the registry has no git repository to ask. It now reads the commit cargo records in .cargo_vcs_info.json when packaging, falling back to git only when that file is absent — which is exactly the case in a normal checkout.

version reported the previous commit on every build after the first. cargo:rerun-if-changed=.git/HEAD does not fire when you commit on the branch you are already on, because that file holds ref: refs/heads/<name> rather than a hash. The ref HEAD names is now watched too, along with packed-refs, and a linked worktree is followed to its real git directory first.

Verified both ways: a binary installed from the packaged crate reports the packaged sha, and a fresh commit in a checkout changes what version prints with no touch to build.rs.

Unchanged from v0.1.0

Everything else. The full description of what this tool does, what it refuses to do, and what has and has not been validated is in the README and in v0.1.0's notes.

Requires Rust 1.85 or later.