From 45499eceed58c60276907c1bcc814d016b521a0d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 25 Aug 2023 20:15:58 +0200 Subject: [PATCH 1/5] Upgrade to v5.60.0 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index fc42627..2565650 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Ghost" description.en = "Publishing, memberships, subscriptions and newsletters platform" description.fr = "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" -version = "5.59.1~ynh1" +version = "5.60.0~ynh1" maintainers = ["Julien Malik"] [upstream] @@ -44,8 +44,8 @@ ram.runtime = "1G" [resources.sources.main] # Unused source, only to trigger the autoupdater prefetch = false - url = "https://github.com/TryGhost/Ghost/archive/refs/tags/v5.59.1.tar.gz" - sha256 = "0718612fbee2108b77f8f64be01fd7b65c2ca0aa9e3f96bfc092b424b4b253a6" + url = "https://github.com/TryGhost/Ghost/archive/refs/tags/v5.60.0.tar.gz" + sha256 = "b240ca5c2591c8d38b2ba2d2f891f553b5734e3329235d40c1b36485bb65f369" autoupdate.strategy = "latest_github_release" [resources.system_user] From 7a4e79122a05ce45554f88ee437d788543971ebc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 25 Aug 2023 18:16:01 +0000 Subject: [PATCH 2/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2dbd62e..d162fdb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Ghost is a powerful app for new-media creators to publish, share, and grow a bus It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. -**Shipped version:** 5.59.1~ynh1 +**Shipped version:** 5.60.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 932ac08..018b424 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Ghost is a powerful app for new-media creators to publish, share, and grow a bus It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. -**Version incluse :** 5.59.1~ynh1 +**Version incluse :** 5.60.0~ynh1 ## Captures d’écran From d90ac95cdbbb7bbec9d890fd65d2b476d5190703 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 27 Aug 2023 19:00:48 +0200 Subject: [PATCH 3/5] Ensure does not need any prompt --- scripts/upgrade | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index bfb99d2..c621add 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,9 +24,15 @@ if [ -z "$db_name" ]; then ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi +# Make sure the .config directory belongs to $app:$app +if [[ $(stat -c "%U:%G" $install_dir/.config) != "$app:$app" ]]; then + chown -R $app:$app $install_dir/.config +fi + #================================================= # STOP SYSTEMD SERVICE #================================================= +# We stop the service first because the compatibility fixes might edit the configuration file of the app. ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" --line_match="Ghost has shut down" --timeout=60 @@ -100,8 +106,10 @@ else ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest popd - # Upgrade Ghost itself pushd $install_dir/ghost + # Make sure the app does not expect to manage its own process + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost config --process local + # Upgrade Ghost itself ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost update $(ynh_app_upstream_version) \ --no-prompt --no-auto-rollback --no-restart popd From 7caa81ab4582114769a1cee6b5fb46b8faeabf26 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 28 Aug 2023 12:18:33 +0200 Subject: [PATCH 4/5] Fix .config directory handling in upgrade --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c621add..07e01fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,7 +25,10 @@ if [ -z "$db_name" ]; then fi # Make sure the .config directory belongs to $app:$app -if [[ $(stat -c "%U:%G" $install_dir/.config) != "$app:$app" ]]; then +if [[ ! -d "$install_dir/.config" ]]; then + mkdir $install_dir/.config + chown $app:$app $install_dir/.config +elif [[ $(stat -c "%U:%G" $install_dir/.config) != "$app:$app" ]]; then chown -R $app:$app $install_dir/.config fi From f8322569309ac7e025015a1494f66b8db2e15beb Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 29 Aug 2023 07:55:09 +0200 Subject: [PATCH 5/5] Remove now useless comment in upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 07e01fc..16ea596 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,7 +35,6 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -# We stop the service first because the compatibility fixes might edit the configuration file of the app. ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" --line_match="Ghost has shut down" --timeout=60