diff --git a/.changes/build-rerun-if-config-var-change.md b/.changes/build-rerun-if-config-var-change.md new file mode 100644 index 000000000..ce821a890 --- /dev/null +++ b/.changes/build-rerun-if-config-var-change.md @@ -0,0 +1,5 @@ +--- +"tauri-build": patch +--- + +Rerun build script if `TAURI_CONFIG` environment variable change. diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 33c829dd8..2adc2f552 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -154,6 +154,7 @@ pub fn try_build(attributes: Attributes) -> Result<()> { use cargo_toml::{Dependency, Manifest}; use tauri_utils::config::{Config, TauriConfig}; + println!("cargo:rerun-if-env-changed=TAURI_CONFIG"); println!("cargo:rerun-if-changed=tauri.conf.json"); #[cfg(feature = "config-json5")] println!("cargo:rerun-if-changed=tauri.conf.json5");