forked from blasthavers/blastmud
14 lines
331 B
Rust
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")
|
|
);
|
|
}
|