atuin/crates/atuin/build.rs
Ellie Huxtable 95cc472037
chore: move crates into crates/ dir (#1958)
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
2024-04-18 16:41:28 +01:00

12 lines
305 B
Rust

use std::process::Command;
fn main() {
let output = Command::new("git").args(["rev-parse", "HEAD"]).output();
let sha = match output {
Ok(sha) => String::from_utf8(sha.stdout).unwrap(),
Err(_) => String::from("NO_GIT"),
};
println!("cargo:rustc-env=GIT_HASH={}", sha);
}