build: track git HEAD and index in build script to accurately detect dirty state

This commit is contained in:
Riz Ashraf committed 2026-09-26 01:07:57 +01:00
1 parent 4ecda68c1e
commit 5bb83a849b
1 file changed
+2
+2
View File
@@ -23,6 +23,8 @@ fn main() {
let version = format!("{build_date} ({git_hash})");
println!("cargo:rustc-env=APP_VERSION={version}");
println!("cargo:rerun-if-changed=../.git/HEAD");
println!("cargo:rerun-if-changed=../.git/index");
if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "windows" {
let mut res = winres::WindowsResource::new();