mirror of
https://github.com/jht5945/prettyjson.git
synced 2025-12-27 17:20:05 +08:00
7 lines
243 B
Rust
7 lines
243 B
Rust
use std::process::Command;
|
|
fn main() {
|
|
let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().unwrap();
|
|
let git_hash = String::from_utf8(output.stdout).unwrap();
|
|
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
|
|
}
|