feat: version string formatting yy.mm.dd.hhmmss, app icon, and test fixes

This commit is contained in:
Riz Ashraf committed 2026-09-18 02:05:08 +01:00
1 parent 1752753fcc
commit 81aac7245b
17 files changed
+170 -412

No files matched your search

+8 -3
View File
@@ -9,17 +9,22 @@ fn main() {
.unwrap_or_else(|| "unknown".to_string());
let git_date = Command::new("git")
.args(["log", "-1", "--format=%cd", "--date=format:%Y.%m.%d"])
.args(["log", "-1", "--format=%cd", "--date=format:%y.%m.%d.%H%M%S"])
.output()
.ok()
.and_then(|out| String::from_utf8(out.stdout).ok())
.unwrap_or_else(|| "unknown".to_string());
let version = format!(
"{} ({} {})",
env!("CARGO_PKG_VERSION"),
"{} ({})",
git_date.trim(),
git_hash.trim()
);
println!("cargo:rustc-env=APP_VERSION={}", version);
if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "windows" {
let mut res = winres::WindowsResource::new();
res.set_icon("app.ico");
res.compile().unwrap();
}
}