mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-06 18:04:20 +01:00
11 lines
315 B
Rust
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());
|
|
}
|
|
}
|
|
}
|