From 0994a895fa61399235c193938dc1fbf91e68e876 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 19 Mar 2021 18:11:47 +0100 Subject: [PATCH] Upgrade to 11.4 --- README.md | 4 ++-- conf/app.src | 4 ++-- manifest.json | 18 +----------------- scripts/change_url | 17 +++++++++++++++++ scripts/restore | 1 - 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 288724b..fd4a536 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Piwigo for YunoHost [![Integration level](https://dash.yunohost.org/integration/piwigo.svg)](https://dash.yunohost.org/appci/app/piwigo) ![](https://ci-apps.yunohost.org/ci/badges/piwigo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/piwigo.maintain.svg) -[![Install Piwigo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=piwigo) +[![Install Piwigo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=piwigo) > *This package allow you to install Piwigo quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Piwigo](http://piwigo.org) is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable. -**Shipped version:** 11.3.0 +**Shipped version:** 11.4.0 ## Screenshots diff --git a/conf/app.src b/conf/app.src index e0244d4..5e0a933 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://piwigo.org/download/dlcounter.php?code=11.3.0 -SOURCE_SUM=07b0a364484c85acecf9abd6ac2b87e9c8793795b760134b4fab96be99228943 +SOURCE_URL=https://piwigo.org/download/dlcounter.php?code=11.4.0 +SOURCE_SUM=21dee6e361be671355627d9241e972458586e6077110080d5d127e8fe435c01b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 7c51100..3ebcf67 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "url": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -28,38 +28,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Piwigo", - "fr": "Choisissez un nom de domaine pour Piwigo" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Piwigo", - "fr": "Choisissez un chemin pour Piwigo" - }, "example": "/piwigo", "default": "/piwigo" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l'administrateur" - }, "example": "homer" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true }, { diff --git a/scripts/change_url b/scripts/change_url index 9533ac5..037f00b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,6 +29,23 @@ ynh_script_progression --message="Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. + ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" + + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= diff --git a/scripts/restore b/scripts/restore index b267c64..5359330 100644 --- a/scripts/restore +++ b/scripts/restore @@ -25,7 +25,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)