From 6033cd21ad032fe5f29f8dd9db578abf2b6abfa9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 19 Mar 2021 12:28:27 +0100 Subject: [PATCH] Upgrade to 4.1.0 --- README.md | 5 ++--- conf/admin.src | 5 +++-- conf/app.src | 4 ++-- manifest.json | 16 ++-------------- scripts/install | 3 +-- scripts/restore | 2 +- scripts/upgrade | 21 +++++++++------------ 7 files changed, 20 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 5436898..2d1cda8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Ghost for YunoHost -[![Integration level](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) - +[![Integration level](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) [![Install Ghost with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ghost) > *This package allows you to install Ghost quickly and simply on a YunoHost server. @@ -10,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Ghost is a fully open source, adaptable platform for building and running a modern online publication. -**Shipped version:** 3.41.8 +**Shipped version:** 4.1.0 ## Screenshots diff --git a/conf/admin.src b/conf/admin.src index 447e425..57910a8 100644 --- a/conf/admin.src +++ b/conf/admin.src @@ -1,6 +1,7 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/3.41.8.zip -SOURCE_SUM=252080e8b4fdc558300b2d33701735a3e2a6d7d82ef66a5eeb9b651a488c67e0 +SOURCE_URL=https://github.com/TryGhost/Admin/archive/v4.1.0.zip +SOURCE_SUM=21551a87bf8870b6cd915d8fc54caff3ad562bc981db5067d6293c9a75bcda96 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false SOURCE_FILENAME= + diff --git a/conf/app.src b/conf/app.src index f72e94d..f9d7e41 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/TryGhost/Ghost/releases/download/3.41.8/Ghost-3.41.8.zip -SOURCE_SUM=e650e3d55155c5974a8c3e58bf996c523be51b3a38f9728517b14d9114e0106a +SOURCE_URL=https://github.com/TryGhost/Ghost/releases/download/v4.1.0/Ghost-4.1.0.zip +SOURCE_SUM=63b620598ad2ce63061e7185cc220cac4b8eec2fc6e19a174f68a4ac97b7ce8d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index c66dbd1..947addb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Just a blogging platform", "fr": "Plateforme de blogging" }, - "version": "3.41.8~ynh1", + "version": "4.1.0~ynh1", "url": "https://ghost.org/", "license": "MIT", "maintainer": { @@ -14,7 +14,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -26,29 +26,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Ghost", - "fr": "Choisissez un domaine pour Ghost" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Ghost", - "fr": "Choisissez un chemin pour Ghost" - }, "example": "/blog", "default": "/blog" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true } ] diff --git a/scripts/install b/scripts/install index 771c72a..23ba43e 100644 --- a/scripts/install +++ b/scripts/install @@ -49,7 +49,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS @@ -176,7 +175,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." if [ $is_public -eq 1 ] then diff --git a/scripts/restore b/scripts/restore index c3392d1..73f6fa2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -121,7 +121,7 @@ yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/ #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ghost boot" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Ghost boot" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 91eed7e..972fdf3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,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) port=$(ynh_app_setting_get --app=$app --key=port) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -38,21 +37,19 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -75,7 +72,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -200,7 +197,7 @@ yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/ #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ghost boot" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Ghost boot" #================================================= # RELOAD NGINX