group-actor/build.rs

11 lines
271 B
Rust
Raw Permalink Normal View History

2021-08-20 20:59:19 +00:00
use std::process::Command;
use std::str;
fn main() {
2021-08-22 17:30:36 +00:00
let desc_c = Command::new("git").args(&["describe", "--all", "--long"]).output().unwrap();
2021-08-20 20:59:19 +00:00
let desc = unsafe { str::from_utf8_unchecked(&desc_c.stdout) };
2021-08-20 20:59:19 +00:00
println!("cargo:rustc-env=GIT_REV={}", desc);
}