feat: commit hash in banner, version command, file upload/download

This commit is contained in:
Helios Agent 2026-03-03 14:29:22 +01:00
parent cb86894369
commit f7d29a98d3
No known key found for this signature in database
GPG key ID: C8259547CD8309B5
8 changed files with 202 additions and 9 deletions

View file

@ -1,8 +1,11 @@
fn main() {
#[cfg(target_os = "windows")]
{
let mut res = winres::WindowsResource::new();
res.set_icon("../../assets/logo.ico");
res.compile().expect("Failed to compile Windows resources");
}
let hash = std::process::Command::new("git")
.args(["rev-parse", "--short", "HEAD"])
.output()
.ok()
.and_then(|o| String::from_utf8(o.stdout).ok())
.unwrap_or_default();
let hash = hash.trim();
println!("cargo:rustc-env=GIT_COMMIT={}", if hash.is_empty() { "unknown" } else { hash });
println!("cargo:rerun-if-changed=.git/HEAD");
}