Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 413 Bytes
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=build.rs");
// Put the git version into the binary using
// and environment variable.
let git_desc = Command::new("git")
.args(&["describe", "--tags", "--dirty"])
.output()
.unwrap();
println!(
"cargo:rustc-env=GIT_DESCRIBE={}",
String::from_utf8_lossy(&git_desc.stdout)
);
}
You can’t perform that action at this time.