From 7f40b5a17b6c990550a03bcd25a023704d9395c8 Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 29 Jul 2024 11:22:01 +0200 Subject: [PATCH] migrate system_addressbook_exposed to boolean, fix upgrade test --- scripts/upgrade | 9 +++++++++ tests.toml | 1 + 2 files changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index c2ddc1d..1441abb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -10,6 +10,15 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +# Fix system_addressbook_exposed as a boolean +if [ "${system_addressbook_exposed,,}" = "yes" ]; then + ynh_app_setting_set --app=$app --key=system_addressbook_exposed --value=1 + system_addressbook_exposed=1 +elif [ "${system_addressbook_exposed,,}" = "no" ]; then + ynh_app_setting_set --app=$app --key=system_addressbook_exposed --value=0 + system_addressbook_exposed=0 +fi + # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only diff --git a/tests.toml b/tests.toml index eb4b363..cdd5e77 100644 --- a/tests.toml +++ b/tests.toml @@ -10,3 +10,4 @@ test_format = 1.0 test_upgrade_from.caf917f3.name = "Upgrade from 26.0.2" test_upgrade_from.9c6d1eea.name = "Upgrade from 27.1.4" test_upgrade_from.e9f82ab7.name = "Upgrade from 28.0.6" + test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes"