feat: rewrite remote.py as Rust CLI binary (crates/cli)
This commit is contained in:
parent
ba3b365f4e
commit
98b6fabef6
6 changed files with 815 additions and 45 deletions
11
crates/cli/build.rs
Normal file
11
crates/cli/build.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fn main() {
|
||||
// Embed git commit hash at build time
|
||||
let output = std::process::Command::new("git")
|
||||
.args(["log", "-1", "--format=%h"])
|
||||
.output();
|
||||
let commit = match output {
|
||||
Ok(o) => String::from_utf8_lossy(&o.stdout).trim().to_string(),
|
||||
Err(_) => "unknown".to_string(),
|
||||
};
|
||||
println!("cargo:rustc-env=GIT_COMMIT={commit}");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue