diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-21 01:10:56 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-21 01:48:40 +0100 |
| commit | b48b0d650cc045fb309819d34928478c05640bf9 (patch) | |
| tree | f1cf0637371f31a61fdc3de1a8290e83322d972e /cli/build.rs | |
| parent | c8b0be21f50b881756fcb61c6b72a96081264e3e (diff) | |
Release action
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(()) +} |
