radicle-tauri/build: Allow Specifying Version via `GIT_HEAD`
This now allows setting GIT_HEAD “from the outside” and will
gracefully fall back to “unknown” in case there’s any issue figuring out
what HEAD refers to.
Also tells Nix about it and bumps MSRV to an unsurprisingly old version.
This now allows setting GIT_HEAD “from the outside” and will
gracefully fall back to “unknown” in case there’s any issue figuring out
what HEAD refers to.
Also tells Nix about it and bumps MSRV to an unsurprisingly old version.
I’m not really able to test the nix changes.
But to make it work on my machine I need to remove the .arg call in the git command
diff --git a/crates/radicle-tauri/build.rs b/crates/radicle-tauri/build.rs
index 2c83c73..46b9747 100644
--- a/crates/radicle-tauri/build.rs
+++ b/crates/radicle-tauri/build.rs
@@ -5,7 +5,6 @@ fn main() {
let head = env::var("GIT_HEAD").unwrap_or_else(|_| {
Command::new("git")
.args(["rev-parse", "--short", "HEAD"])
- .arg("HEAD")
.output()
.map(|output| String::from_utf8(output.stdout).expect("output from Git is UTF-8"))
.unwrap_or("unknown".into())
rest of the patch lgtm
Thanks for the review and catching the bug. Rebased.