blastmud/blastmud_listener/build.rs

14 lines
331 B
Rust
Raw Normal View History

use std::process::Command;
pub fn main() {
let cmdout = Command::new("git")
2023-06-03 23:47:29 +10:00
.arg("rev-parse")
.arg("HEAD")
.output()
.expect("git rev-parse HEAD failed");
println!(
"cargo:rustc-env=GIT_VERSION={}",
String::from_utf8(cmdout.stdout).expect("git revision not UTF-8")
);
}