From 30697f7a776643fc84b394646eff534d48a8a7dc Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sun, 23 Jun 2024 21:44:40 +0200 Subject: [PATCH] handle the 2.27 -> 2.30 migration --- doc/POST_UPGRADE.d/2.30.0~ynh1.md | 5 +++++ scripts/upgrade | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 doc/POST_UPGRADE.d/2.30.0~ynh1.md diff --git a/doc/POST_UPGRADE.d/2.30.0~ynh1.md b/doc/POST_UPGRADE.d/2.30.0~ynh1.md new file mode 100644 index 0000000..864af3b --- /dev/null +++ b/doc/POST_UPGRADE.d/2.30.0~ynh1.md @@ -0,0 +1,5 @@ +There are a lot of broken plugins after the 2.30 migration. + +In order to migrate your blog, we had to deactivate all plugins by creating a `_disabled` file inside each plugin folder located in `__INSTALL_DIR__/plugins/`. + +Please remove these `_disabled` files one by one and make sure your blog is still working after each deletion. \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index dbcf199..fb57d17 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,15 @@ fi # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +if ynh_compare_current_package_version --comparison lt --version 2.30.0; then + ynh_print_warn --message="Disable all plugins before the migration. To reactivate them, navigate to all plugins at $install_dir/plugins/, and remove each \"_disabled\" file one by one, and make sure you blog works as expected after each deletion" + for folder in "$install_dir"/plugins/*/ + do + ynh_print_warn --message="Plugin $folder disabled" + touch "$folder"/_disabled + done +fi + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..."