summaryrefslogtreecommitdiff
path: root/cli/build.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-21 01:10:56 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-21 01:48:40 +0100
commitb48b0d650cc045fb309819d34928478c05640bf9 (patch)
treef1cf0637371f31a61fdc3de1a8290e83322d972e /cli/build.rs
parentc8b0be21f50b881756fcb61c6b72a96081264e3e (diff)
Release action
Diffstat (limited to 'cli/build.rs')
-rw-r--r--cli/build.rs9
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(())
+}