Files
pezkuwi-telemetry/backend/telemetry_core/build.rs
T
James Wilson 71744ade7c Expose GitHub hash in UI (#604)
* Expose GitHub hash in UI

* Prettier:fix

* cargo fmt

* Update tests

* Fix test
2025-08-28 18:05:46 +01:00

13 lines
356 B
Rust

use std::process::Command;
fn main() {
// Fetch the git hash if possible, <unknown> if not.
let git_hash = Command::new("git")
.args(&["rev-parse", "HEAD"])
.output()
.map(|output| String::from_utf8(output.stdout).unwrap_or_default())
.unwrap_or_default();
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
}