diff options
Diffstat (limited to 'cli/build.rs')
| -rw-r--r-- | cli/build.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/build.rs b/cli/build.rs new file mode 100644 index 00000000..f7b70e7f --- /dev/null +++ b/cli/build.rs @@ -0,0 +1,9 @@ +use std::error::Error; +use std::process::Command; + +fn main() -> Result<(), Box<dyn Error>> { + let output = Command::new("git").args(&["rev-parse", "HEAD"]).output()?; + let hash = std::str::from_utf8(&output.stdout)?; + println!("cargo:rustc-env=TYPST_HASH={}", &hash[..8]); + Ok(()) +} |
