fix(tauri) properly rebuild when tauri conf changes (#787)

This commit is contained in:
Lucas Fernandes Nogueira 2020-07-09 10:52:47 -03:00 committed by GitHub
parent 6a179997b4
commit 18452edd98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-api": patch
---
Fixes the config reloading when tauri.conf.json changes.

View File

@ -14,6 +14,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
match env::var_os("TAURI_CONFIG") {
Some(tauri_config) => {
println!("cargo:rerun-if-env-changed=TAURI_CONFIG");
let tauri_config_string = tauri_config.into_string().unwrap();
write!(config_file, "{}", tauri_config_string)?;
}

View File

@ -78,12 +78,6 @@ pub fn main() {
}
fn shared() {
if let Some(tauri_dir) = std::env::var_os("TAURI_DIR") {
let mut tauri_path = std::path::PathBuf::from(tauri_dir);
tauri_path.push("tauri.conf.json");
println!("cargo:rerun-if-changed={:?}", tauri_path);
}
setup_env_aliases();
}