git-latest-commit
Makes a file available to a Rust project at build time containing the latest commit's sha and summary as static vars.
Shamelessly adapted from cstorey/git-build-version.
Invoke this tool in your package build step. In Cargo.toml
, add it as a build dep:
[]
= "something-gratuitously-mentioning-rust"
= "build.rs"
[]
= "0.1.1"
Then, in build.rs
at the top level of your project:
extern crate git_latest_commit;
const PACKAGE_TOP_DIR : &'static str = ".";
License
ISC