fix: version handling in protocol-testing
This commit is contained in:
15
protocol-testing/build.rs
Normal file
15
protocol-testing/build.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn hash() {
|
||||
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}");
|
||||
println!("cargo:rerun-if-changed=.git/HEAD");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
hash();
|
||||
}
|
||||
Reference in New Issue
Block a user