diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:00:06 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:00:06 +0200 |
| commit | 2f671f196e245ac1a791c001286e401a2fab9d3a (patch) | |
| tree | be90d8f16d5c8b65c6b77ebe1359d22e9738bbf6 /crates/client/build.rs | |
| parent | chore: Commit (diff) | |
| download | atuin-2f671f196e245ac1a791c001286e401a2fab9d3a.zip | |
chore: Commit
Diffstat (limited to 'crates/client/build.rs')
| -rw-r--r-- | crates/client/build.rs | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/crates/client/build.rs b/crates/client/build.rs index 17a532cc..939d6405 100644 --- a/crates/client/build.rs +++ b/crates/client/build.rs @@ -1,20 +1,12 @@ use std::process::Command; -use std::{env, fs, path::PathBuf}; -use protox::Compiler; -use protox::prost::Message; +fn main() { + let output = Command::new("git").args(["rev-parse", "HEAD"]).output(); -fn main() -> Result<(), std::io::Error> { - { - let output = Command::new("git").args(["rev-parse", "HEAD"]).output(); + let sha = match output { + Ok(sha) => String::from_utf8(sha.stdout).unwrap(), + Err(_) => String::from("NO_GIT"), + }; - let sha = match output { - Ok(sha) => String::from_utf8(sha.stdout).unwrap(), - Err(_) => String::from("NO_GIT"), - }; - - println!("cargo:rustc-env=GIT_HASH={sha}"); - } - - Ok(()) + println!("cargo:rustc-env=GIT_HASH={sha}"); } |
