aboutsummaryrefslogtreecommitdiffstats
path: root/crates/client/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/client/build.rs')
-rw-r--r--crates/client/build.rs22
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}");
}