Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle-tauri/build: Allow Specifying Version via `GIT_HEAD`
✓ 1/1 checks passed lorenz wants to merge 3 commits into main · opened 1 year 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.

All checks passed — 1 passed View logs ↗
lorenz opened with revision eadd95652efb0fcc0aca1cdbe7baccfb21be1a1a on base e427af7ed252edf633ceab890c8dc1bf3b762160 +19 -10 1 year ago
sebastinez reviewed 1 year 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 23f3d60ed818d3bd1434c65718abaad227991b59 on base 2ae7b65674b87b3ab5ad2885edd4a77406f2165c +18 -10 1 year ago

Thanks for the review and catching the bug. Rebased.