blob: f7b70e7f80aa1e77e8247b8953409484c218804c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
use std::error::Error;
use std::process::Command;
fn main() -> Result<(), Box<dyn Error>> {
let output = Command::new("git").args(&["rev-parse", "HEAD"]).output()?;
let hash = std::str::from_utf8(&output.stdout)?;
println!("cargo:rustc-env=TYPST_HASH={}", &hash[..8]);
Ok(())
}
|