aports/testing/faircamp/external-revision.patch
Hannes Braun f4f569142c testing/faircamp: new aport
A static site generator for audio producers
https://simonrepp.com/faircamp
2026-01-11 16:36:30 +00:00

22 lines
750 B
Diff

diff --git a/build.rs b/build.rs
index cc9c1a8..3e6c4f4 100644
--- a/build.rs
+++ b/build.rs
@@ -17,15 +17,7 @@ use base64::engine::general_purpose::URL_SAFE_NO_PAD;
/// If git is not available, we fall back to "unknown revision".
/// The output is stored in FAIRCAMP_REVISION.
fn compute_revision() {
- let mut git = Command::new("git");
-
- git.args(["rev-parse", "--short", "HEAD"]);
-
- let revision = match git.output() {
- Ok(output) if output.status.success() => String::from_utf8(output.stdout).unwrap(),
- _ => String::from("unknown revision")
- };
-
+ let revision = std::env::var("FAIRCAMP_REVISION").unwrap_or("unknown revision".into());
println!("cargo:rustc-env=FAIRCAMP_REVISION={revision}");
}