From a9023de4125d1ccef6cc3af1f69b2e4c714ba60f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Dec 2023 12:27:53 +0100 Subject: [PATCH] Improve handling of non-core extensions that should be kept during source upgrade --- scripts/upgrade | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9a13bbf..9b1ffd6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,11 +25,9 @@ then # Download, check integrity, uncompress and patch the source from app.src # TODO : find a way to sync stable extensions list to avoid hardcoded extensions folders to keep + noncore_extensions="$(echo tools/{accountactivationbyemail,advancedsearch,benevolat,ferme,fontautoinstall,ipblock,lms,login-sso,logincas,loginldap,maintenance,multideletepages,nextcloudconnector,publication,qrcode,stats,tabdyn,twolevels,webhooks,yunohost})" ferme_instances="$(cd $install_dir; for p in $(ls -- */wakka.config.php 2>/dev/null); do dirname "$p"; done)" - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env $ferme_instances wakka.config.php files custom private themes -tools/accountactivationbyemail tools/advancedsearch tools/benevolat tools/ferme tools/fontautoinstall tools/ipblock -tools/lms tools/login-sso tools/logincas tools/loginldap tools/maintenance tools/multideletepages -tools/nextcloudconnector tools/publication tools/qrcode tools/stats tools/tabdyn tools/twolevels tools/webhooks" + ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env wakka.config.php files custom private themes $noncore_extensions $ferme_instances" ynh_replace_string --match_string="yeswiki_release' \?=> \?'.*',$" --replace_string="yeswiki_release' => '$(ynh_app_upstream_version)'," --target_file="$install_dir/wakka.config.php" fi