feat: commit hash in banner, version command, file upload/download
This commit is contained in:
parent
cb86894369
commit
f7d29a98d3
8 changed files with 202 additions and 9 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue