fix(build): skip rerun-if-changed when Info.plist do not exist (#10267)

This commit is contained in:
Lucas Fernandes Nogueira
2024-07-12 10:13:08 -03:00
committed by GitHub
parent 5d29229858
commit 69dcfdfe0f
2 changed files with 11 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-build": patch:bug
---
Fix build script rerun-if-changed instruction if Info.plist do not exist next to tauri.conf.json.

View File

@@ -115,10 +115,12 @@ impl CodegenContext {
}
#[cfg(target_os = "macos")]
println!(
"cargo:rerun-if-changed={}",
config_parent.join("Info.plist").display()
);
{
let info_plist_path = config_parent.join("Info.plist");
if info_plist_path.exists() {
println!("cargo:rerun-if-changed={}", info_plist_path.display());
}
}
let code = context_codegen(ContextData {
dev: crate::is_dev(),