Files
notedeck/build.rs
kernelkind 308717cabf include commit hash in SupportView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 16:13:36 -05:00

11 lines
315 B
Rust

use std::process::Command;
fn main() {
if let Ok(output) = Command::new("git").args(["rev-parse", "HEAD"]).output() {
if output.status.success() {
let hash = String::from_utf8_lossy(&output.stdout);
println!("cargo:rustc-env=GIT_COMMIT_HASH={}", hash.trim());
}
}
}