blastmud/blastmud_game/build.rs
2023-06-03 23:47:29 +10:00

14 lines
331 B
Rust

use std::process::Command;
pub fn main() {
let cmdout = Command::new("git")
.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")
);
}