rust-nex/rnex-server/build.rs

13 lines
383 B
Rust
Raw Permalink Normal View History

2026-06-08 10:31:55 +02:00
use std::{env, process::Command};
fn main() {
let output = Command::new("git")
2026-07-12 18:21:18 +02:00
.args(["rev-parse", "HEAD"])
2026-06-08 10:31:55 +02:00
.output()
.unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
2026-07-12 18:21:18 +02:00
println!("cargo:rustc-env=GIT_HASH={git_hash}");
2026-06-08 10:31:55 +02:00
println!(
"cargo:rustc-env=FEATURESET={}",
env::var("CARGO_CFG_FEATURE").unwrap()
);
}