This commit is contained in:
2019-11-23 01:33:24 +08:00
parent f400eb35ee
commit 2723847348
2 changed files with 141 additions and 44 deletions

6
build.rs Normal file
View File

@@ -0,0 +1,6 @@
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);
}