Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
radicle-tauri/build: Allow Specifying Version via `GIT_HEAD`
Open lorenz opened 11 months ago

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.

lorenz opened with revision eadd9565 on base e427af7e +19 -10 11 months ago

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.

did:key:z6MkkfM3...sVz5 reviewed 11 months ago

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

lorenz pushed revision 2 23f3d60e on base 2ae7b656 +18 -10 11 months ago

Thanks for the review and catching the bug. Rebased.