mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-01 03:42:59 +02:00
22 lines
750 B
Diff
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}");
|
|
}
|
|
|