1
0
mirror of https://github.com/jht5945/prettyjson.git synced 2025-12-28 01:40:05 +08:00
Files
prettyjson/build.rs
2019-08-03 10:08:50 +08:00

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);
}