From f372d90c3aff01e63636f11d518e03c71864b886 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Tue, 29 Dec 2020 15:14:43 +0100 Subject: [PATCH] Upgrade to upstream version 2.4.0 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/change_url | 3 --- scripts/install | 3 --- scripts/upgrade | 12 +++++++++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 57b007a..d28183a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ It extracts content so that you can read it when you have time. It provides a web interface, browser (Firefox / Chrome / Opera) add-ons, mobile apps (Android / iOS / Windows Phone) and even on e-reader (PocketBook / Kobo). -**Shipped version:** 2.3.8 +**Shipped version:** 2.4.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index d47f30e..dce0239 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Sont disponibles une interface web, des add-ons pour navigateurs (Firefox / Chrome / Opera), des applications pour mobile (Android / iOS / Windows Phone) et même sur liseuse (PocketBook / Kobo). -**Version incluse:** 2.3.8 +**Version incluse:** 2.4.0 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 4ab2afd..b92f919 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://static.wallabag.org/releases/wallabag-release-2.3.8.tar.gz -SOURCE_SUM=58f319ee41828fcc4fd00a14c4ac7c16b2179a47af21e257a15938311d1426eb +SOURCE_URL=https://static.wallabag.org/releases/wallabag-release-2.4.0.tar.gz +SOURCE_SUM=11caf6e87661215f8bb898fc61c149d8fd14de3f19928d50be53208cd5516d87 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 6908b1c..1282a40 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A self hostable read-it-later app", "fr": "Une application de lecture-plus-tard auto-hébergeable" }, - "version": "2.3.8~ynh2", + "version": "2.4.0~ynh1", "url": "https://www.wallabag.org", "license": "MIT", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index ab8759c..bb292b5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="php-cli php-mysql php-json php-gd php-tidy php-curl php-gettext php-redis" +pkg_dependencies="php-cli php-mysql php-json php-gd php-tidy php-curl php-gettext php-redis php-imagick" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/change_url b/scripts/change_url index d26bf9f..58ea780 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -83,9 +83,6 @@ fi #================================================= ynh_script_progression --message="Updating wallabag configuration..." -# Configure Wallabag instance URL -ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <<< "UPDATE craue_config_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'" - # Change domain name in parameters.yml ynh_replace_string --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" --target_file=$final_path/app/config/parameters.yml diff --git a/scripts/install b/scripts/install index 1005880..3393eb0 100644 --- a/scripts/install +++ b/scripts/install @@ -141,9 +141,6 @@ done # Set admin user $php_exec fos:user:promote --super "$admin" -# Configure Wallabag instance URL -ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <<< "UPDATE craue_config_setting SET value = 'https://$domain$path_url' WHERE name = 'wallabag_url'" - #================================================= # CONFIGURE FAIL2BAN #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index baa15cf..bf85823 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -162,7 +162,7 @@ then #================================================= # Alias for php-cli execution command - php_exec="ynh_exec_as $app php "$final_path/bin/console" --no-interaction --env=prod" + php_exec="ynh_exec_as $app php "$final_path/bin/console" --no-interaction --env prod" # Set permissions to app files chown -R $app: $final_path @@ -171,8 +171,14 @@ then $php_exec doctrine:migrations:migrate $php_exec cache:clear - # Configure Wallabag instance URL - ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <<< "UPDATE craue_config_setting SET value = 'https://$domain$path_url' WHERE name = 'wallabag_url'" + current_upstream_version="$(ynh_app_upstream_version --manifest="/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json")" + if dpkg --compare-versions "2.4.0" gt "$current_upstream_version"; then + ynh_script_progression --message="Ensuring upgrade compatibility to Wallabag 2.4.0..." + + # Generate hashed URLs for faster check + # TODO does it take much time... ? + $php_exec wallabag:generate-hashed-urls + fi fi #=================================================