Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Use the build.rs at root
xphoniex committed 3 years ago
commit 21e47c7a340a530e61fa3bebf024169a0f540845
parent f5d06f61385adf5d43c2c3d580016e929ed06a6a
2 files changed +1 -23
modified radicle-cli/Cargo.toml
@@ -4,6 +4,7 @@ license = "MIT OR Apache-2.0"
version = "0.8.0"
authors = ["Alexis Sellier <alexis@radicle.xyz>"]
edition = "2021"
+
build = "../build.rs"

[[bin]]
name = "rad"
deleted radicle-cli/build.rs
@@ -1,23 +0,0 @@
-
use std::process::Command;
-

-
fn main() {
-
    // Set a build-time `GIT_HEAD` env var which includes the commit id;
-
    // such that we can tell which code is running.
-
    let hash = Command::new("git")
-
        .arg("rev-parse")
-
        .arg("--short")
-
        .arg("HEAD")
-
        .output()
-
        .ok()
-
        .and_then(|output| {
-
            if output.status.success() {
-
                String::from_utf8(output.stdout).ok()
-
            } else {
-
                None
-
            }
-
        })
-
        .unwrap_or_else(|| String::from("unknown"));
-

-
    println!("cargo:rustc-env=GIT_HEAD={}", hash);
-
    println!("cargo:rustc-rerun-if-changed=.git/HEAD");
-
}