build: track git HEAD and index in build script to accurately detect dirty state
This commit is contained in:
1 parent
4ecda68c1e
commit
5bb83a849b
1 file changed
+2
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user