diff --git a/.changes/v1-migrate-updater.md b/.changes/v1-migrate-updater.md new file mode 100644 index 000000000..74af5344b --- /dev/null +++ b/.changes/v1-migrate-updater.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Migration from v1 to v2 now adds the updater plugin when it is active. diff --git a/tooling/cli/src/migrate/migrations/v1/config.rs b/tooling/cli/src/migrate/migrations/v1/config.rs index da0536443..241f2441a 100644 --- a/tooling/cli/src/migrate/migrations/v1/config.rs +++ b/tooling/cli/src/migrate/migrations/v1/config.rs @@ -110,8 +110,8 @@ fn migrate_config(config: &mut Value) -> Result { process_cli(&mut plugins, cli)?; } - // cli - process_updater(tauri_config, &mut plugins)?; + // updater + process_updater(tauri_config, &mut plugins, &mut migrated)?; } config.insert("plugins".into(), plugins.into()); @@ -512,6 +512,7 @@ fn process_cli(plugins: &mut Map, cli: Value) -> Result<()> { fn process_updater( tauri_config: &mut Map, plugins: &mut Map, + migrated: &mut MigratedConfig, ) -> Result<()> { if let Some(mut updater) = tauri_config.remove("updater") { if let Some(updater) = updater.as_object_mut() { @@ -528,6 +529,7 @@ fn process_updater( || updater.get("pubkey").is_some() { plugins.insert("updater".into(), serde_json::to_value(updater)?); + migrated.plugins.insert("updater".to_string()); } } }