mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-01 09:40:28 +08:00
In preparation for merging radicle-desktop into radicle-gui. It's a pure rename, so git can follow every file across the move.
14 lines
409 B
Rust
14 lines
409 B
Rust
use std::env;
|
|
use std::process::Command;
|
|
|
|
fn main() {
|
|
let head = env::var("GIT_HEAD").unwrap_or_else(|_| {
|
|
Command::new("git")
|
|
.args(["rev-parse", "--short", "HEAD"])
|
|
.output()
|
|
.map(|output| String::from_utf8(output.stdout).expect("output from Git is UTF-8"))
|
|
.unwrap_or("unknown".into())
|
|
});
|
|
println!("cargo::rustc-env=GIT_HEAD={head}");
|
|
}
|