Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
845 B
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
diff --git i/build.rs w/build.rs
index 2174a43..cf93c2f 100644
--- i/build.rs
+++ w/build.rs
@@ -14,17 +14,8 @@ fn main() {
// Print the path to make it available during the build
println!("cargo:rustc-env=SUS_HOME={}", home_dir.to_str().unwrap());
- // note: add error checking yourself.
- let output = std::process::Command::new("git")
- .args(["rev-parse", "HEAD"])
- .output()
- .unwrap();
- let git_hash = String::from_utf8(output.stdout).unwrap();
- println!("cargo:rustc-env=GIT_HASH={}", git_hash);
- println!(
- "cargo:rustc-env=BUILD_DATE={}",
- chrono::Local::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, false)
- );
+ println!("cargo:rustc-env=GIT_HASH=@GIT_HASH@");
+ println!("cargo:rustc-env=BUILD_DATE=@GIT_DATE@");
}
fn get_sus_dir() -> PathBuf {