From 071f0043a4ff58ced9d9926ff210bb154a522fa2 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Thu, 6 Oct 2022 07:38:13 +0200 Subject: [PATCH 1/7] Fix: install, upgrade script --- scripts/install | 2 +- scripts/upgrade | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 778b9a9..b2c894f 100644 --- a/scripts/install +++ b/scripts/install @@ -123,7 +123,7 @@ fi # Modify Config index_file="$final_path/live/packages/web/dist/index.html" -ynh_replace_string --match_string="\(defaultSyncServer = \).*" --replace_string="\1\"$snserver_domain\"" --target_file="$index_file" +ynh_replace_string --match_string="\(defaultSyncServer = \).*" --replace_string="\1\"https://$snserver_domain\"" --target_file="$index_file" ynh_replace_string --match_string="\(defaultFilesHost = \).*" --replace_string="\1\"\"" --target_file="$index_file" ynh_replace_string --match_string="\(enabledUnfinishedFeatures = \).*" --replace_string="\1false" --target_file="$index_file" ynh_replace_string --match_string="\(websocketUrl = \).*" --replace_string="\1\"\"" --target_file="$index_file" diff --git a/scripts/upgrade b/scripts/upgrade index 6e14e99..729bf08 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,6 +68,22 @@ if [ -z "$snserver_domain" ]; then snserver_domain="api.standardnotes.com" fi +if ynh_compare_current_package_version --comparison lt --version 3.66.0~ynh1 +then + # Remove old service + ynh_script_progression --message="Removing $app service..." --weight=1 + yunohost service remove "$app" + + # Remove the dedicated systemd config + ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 + ynh_remove_systemd_config --service="$app" + + # Remove unneeded ruby + ynh_remove_ruby + ynh_secure_remove --file="$final_path/.bundle" + ynh_secure_remove --file="$final_path/.ruby-version" +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -84,6 +100,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=17 + ynh_secure_remove --file="$final_path/live" + # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path/live" fi @@ -106,7 +124,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=37 -ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies +ynh_install_app_dependencies $pkg_dependencie ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" @@ -143,7 +161,7 @@ fi # Modify Config index_file="$final_path/live/packages/web/dist/index.html" -ynh_replace_string --match_string="\(defaultSyncServer = \).*" --replace_string="\1\"$snserver_domain\"" --target_file="$index_file" +ynh_replace_string --match_string="\(defaultSyncServer = \).*" --replace_string="\1\"https://$snserver_domain\"" --target_file="$index_file" ynh_replace_string --match_string="\(defaultFilesHost = \).*" --replace_string="\1\"\"" --target_file="$index_file" ynh_replace_string --match_string="\(enabledUnfinishedFeatures = \).*" --replace_string="\1false" --target_file="$index_file" ynh_replace_string --match_string="\(websocketUrl = \).*" --replace_string="\1\"\"" --target_file="$index_file" From ac480d7866063ebe9c2e8ba3dc8959e5986161d4 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Thu, 6 Oct 2022 07:39:09 +0200 Subject: [PATCH 2/7] Update DISCLAIMER.md --- doc/DISCLAIMER.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 2c669cc..08a9707 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,10 +1,3 @@ * No single-sign on or LDAP integration * The app requires up 1500MB of RAM to install -* The app requires at least 100MB of RAM to work properly. -* The app requires around 3500MB of disk. - -* A dedicated domain is requierd if you want to use extensions. - * notes.your-domain.tld/ -> Extensions are working - * your-domain.tld/notes/ -> Extensions are not working - -* The config-file is stored under "/opt/yunohost/$app/live/.env" +* The app requires around 3600MB of disk. From d5c8d08d5721900b7458a2438b9e55ece7b7f0df Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Thu, 6 Oct 2022 07:43:13 +0200 Subject: [PATCH 3/7] Update: manifest.json, check_process --- check_process | 8 ++++---- manifest.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index 979298f..a55a184 100644 --- a/check_process +++ b/check_process @@ -11,8 +11,8 @@ setup_private=1 setup_public=1 upgrade=1 - # 3.20.2~ynh1 - # upgrade=1 from_commit=294a7b88cd8dbf396b6f90ecc164cedcb0516e57 + # 3.39.1~ynh1 + upgrade=1 from_commit=4941f89800edb99faec7094d5ee3ed814b00dec6 backup_restore=1 multi_instance=1 port_already_use=0 @@ -21,6 +21,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=294a7b88cd8dbf396b6f90ecc164cedcb0516e57 - name=3.20.2~ynh1 + ; commit=4941f89800edb99faec7094d5ee3ed814b00dec6 + name=3.39.1~ynh1 manifest_arg=domain=DOMAIN&is_public=1 diff --git a/manifest.json b/manifest.json index 36fb407..4786072 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "End-to-end encrypted note-taking app", "fr": "Application de prise de notes chiffrées" }, - "version": "3.66.0~ynh1", + "version": "3.66.0~ynh2", "url": "https://github.com/standardnotes/web", "upstream": { "license": "AGPL-3.0-or-later", From 2196773902aebd5f83ab0244101b7ca1c37f0c6e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 6 Oct 2022 05:43:30 +0000 Subject: [PATCH 4/7] Auto-update README --- README.md | 11 ++--------- README_fr.md | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8867115..524d649 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in End-to-end encrypted note-taking app -**Shipped version:** 3.66.0~ynh1 +**Shipped version:** 3.66.0~ynh2 *(:warning: This is the `fix` branch. The [`master` branch](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) used in the catalog is currently on version 3.66.0\~ynh1.)* **Demo:** https://standardnotes.org/demo @@ -30,14 +30,7 @@ End-to-end encrypted note-taking app * No single-sign on or LDAP integration * The app requires up 1500MB of RAM to install -* The app requires at least 100MB of RAM to work properly. -* The app requires around 3500MB of disk. - -* A dedicated domain is requierd if you want to use extensions. - * notes.your-domain.tld/ -> Extensions are working - * your-domain.tld/notes/ -> Extensions are not working - -* The config-file is stored under "/opt/yunohost/$app/live/.env" +* The app requires around 3600MB of disk. ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index c3a9eb6..0cb5f1d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Application de prise de notes chiffrées -**Version incluse :** 3.66.0~ynh1 +**Version incluse :** 3.66.0~ynh2 *(:warning: Il s'agit de la branche `fix`. La [branche `master`](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) utilisée dans le catalogue est actuellement en 3.66.0\~ynh1.)* **Démo :** https://standardnotes.org/demo @@ -30,14 +30,7 @@ Application de prise de notes chiffrées * No single-sign on or LDAP integration * The app requires up 1500MB of RAM to install -* The app requires at least 100MB of RAM to work properly. -* The app requires around 3500MB of disk. - -* A dedicated domain is requierd if you want to use extensions. - * notes.your-domain.tld/ -> Extensions are working - * your-domain.tld/notes/ -> Extensions are not working - -* The config-file is stored under "/opt/yunohost/$app/live/.env" +* The app requires around 3600MB of disk. ## Documentations et ressources From b5f34c8762e2059656a7f13f9e309def4aa28801 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens <46000361+FabianWilkens@users.noreply.github.com> Date: Thu, 6 Oct 2022 07:48:32 +0200 Subject: [PATCH 5/7] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 729bf08..f7e866e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -124,7 +124,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=37 -ynh_install_app_dependencies $pkg_dependencie +ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" From c883bf5a9db3d602f5f0c3e39ceebba9d65bc8a2 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Thu, 6 Oct 2022 12:25:49 +0200 Subject: [PATCH 6/7] Fix: ynh_remove_ruby --- scripts/ynh_install_ruby__2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ynh_install_ruby__2 b/scripts/ynh_install_ruby__2 index 982d0b2..6facddb 100644 --- a/scripts/ynh_install_ruby__2 +++ b/scripts/ynh_install_ruby__2 @@ -303,7 +303,7 @@ ynh_cleanup_ruby () { if [[ ! $required_ruby_versions ]] then # Remove rbenv environment configuration - ynh_print_info --message="Removing of rbenv-$rbenv_version" + ynh_print_info --message="Removing of rbenv" ynh_secure_remove --file="$rbenv_install_dir" ynh_secure_remove --file="/etc/profile.d/rbenv.sh" fi From c4276688b7f3f04503167bd1b5991d66654b3402 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 7 Oct 2022 04:41:09 +0000 Subject: [PATCH 7/7] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 524d649..67638c1 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in End-to-end encrypted note-taking app -**Shipped version:** 3.66.0~ynh2 *(:warning: This is the `fix` branch. The [`master` branch](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) used in the catalog is currently on version 3.66.0\~ynh1.)* - +**Shipped version:** 3.66.0~ynh2 **Demo:** https://standardnotes.org/demo diff --git a/README_fr.md b/README_fr.md index 0cb5f1d..04195a9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,8 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Application de prise de notes chiffrées -**Version incluse :** 3.66.0~ynh2 *(:warning: Il s'agit de la branche `fix`. La [branche `master`](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) utilisée dans le catalogue est actuellement en 3.66.0\~ynh1.)* - +**Version incluse :** 3.66.0~ynh2 **Démo :** https://standardnotes.org/demo