1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snweb_ynh.git synced 2024-09-03 20:26:22 +02:00

Merge pull request #52 from YunoHost-Apps/fix

Fix
This commit is contained in:
Fabian Wilkens 2022-10-07 06:41:05 +02:00 committed by GitHub
commit 78477f9694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 35 deletions

View file

@ -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 *(:warning: This is the `testing` branch. The [`master` branch](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) used in the catalog is currently on version 3.39.1\~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

View file

@ -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 *(:warning: Il s'agit de la branche `testing`. La [branche `master`](https://github.com/YunoHost-Apps/snweb_ynh/tree/master) utilisée dans le catalogue est actuellement en 3.39.1\~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

View file

@ -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

View file

@ -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.

View file

@ -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",

View file

@ -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"

View file

@ -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_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"
@ -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"

View file

@ -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