mirror of
https://github.com/robcholz/vibebox.git
synced 2026-04-02 00:20:13 +02:00
13 lines
359 B
Rust
13 lines
359 B
Rust
use std::process::Command;
|
|
|
|
fn main() {
|
|
let sha = Command::new("git")
|
|
.args(["rev-parse", "--short", "HEAD"])
|
|
.output()
|
|
.map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string())
|
|
.unwrap_or_else(|_| "unknown".into());
|
|
|
|
println!("cargo:rustc-env=GIT_SHA={sha}");
|
|
println!("cargo:rerun-if-changed=.git/HEAD");
|
|
}
|