include commit hash in SupportView

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-11-21 16:13:36 -05:00
parent 679a5afdeb
commit 308717cabf
3 changed files with 12 additions and 1 deletions

10
build.rs Normal file
View File

@@ -0,0 +1,10 @@
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());
}
}
}