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

Merge pull request #33 from YunoHost-Apps/testing

Testing
This commit is contained in:
Fabian Wilkens 2021-07-17 18:52:38 +02:00 committed by GitHub
commit 2e2bfe57aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 46 additions and 34 deletions

View file

@ -53,4 +53,3 @@ about: When creating a bug report, please use the following template to provide
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

View file

@ -14,4 +14,3 @@
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
The Standard Notes syncing server. An end-to-end encrypted note-taking app.
**Shipped version:** 2021.07.06~ynh1
**Shipped version:** 2021.07.06~ynh2
**Demo:** https://standardnotes.org/demo

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
**Version incluse :** 2021.07.06~ynh1
**Version incluse :** 2021.07.06~ynh2
**Démo :** https://standardnotes.org/demo

View file

@ -17,6 +17,10 @@ location = __PATH__/ {
return 200 "This is where Standard Notes - Syncing Server is installed.";
}
location = __PATH__/help {
return 301 https://$server_name__PATH__/help/;
}
location __PATH__/help/ {
alias __FINAL_PATH_WWW__/help/;

View file

@ -5,7 +5,7 @@
"description": {
"en": "The Standard Notes syncing server. An end-to-end encrypted note-taking app."
},
"version": "2021.07.06~ynh1",
"version": "2021.07.06~ynh2",
"url": "https://github.com/standardnotes/standalone",
"upstream": {
"license": "AGPL-3.0-or-later",

View file

@ -158,14 +158,11 @@ ynh_script_progression --message="Sending a readme for the admin..."
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__"
admin_mail_info="You changed the url of the server. All Extensions have to be reinstalled by the users. Or you can change the url back."
echo -e "\
Standard Notes - Syncing Server's url was successfully changed.\n\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\
$config_panel\n\n\
$admin_mail_info\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\
\n\
You changed the url of the server. All Extensions have to be reinstalled by the users. Or you can change the url back.\
" > message
ynh_send_readme_to_admin --app_message="message" --type='change_url'

View file

@ -352,18 +352,15 @@ ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Sending a readme for the admin..."
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__"
admin_mail_info="\
Standard Notes extensions are hosted with this package.\n\
Please setup the Access-Domain for the extensions in the __URL_TAG1__config-panel__URL_TAG2__$admin_panel/config-panel__URL_TAG3__ if not already done during the installation settings.\
"
echo -e "\
Standard Notes - Syncing Server was successfully installed.\n\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\
$config_panel\n\n\
$admin_mail_info\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\
\n\
Standard Notes extensions are hosted with this package.\n\
An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\
The Help page is accessible via the Yunohost Portal.\n\
You can deactivate the Help page under: $admin_panel\
" > message
ynh_send_readme_to_admin --app_message="message" --type='install'

View file

@ -36,13 +36,29 @@ final_path_www=$(ynh_app_setting_get --app=$app --key=final_path_www)
#=================================================
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
if ynh_exec_warn_less yunohost service status "$app-syncing-server-js" >/dev/null
then
ynh_script_progression --message="Removing $app service..." --weight=1
ynh_script_progression --message="Removing $app-syncing-server-js service..." --weight=1
yunohost service remove "$app-syncing-server-js"
fi
if ynh_exec_warn_less yunohost service status "$app-syncing-server-js-worker" >/dev/null
then
ynh_script_progression --message="Removing $app-syncing-server-js-worker service..." --weight=1
yunohost service remove "$app-syncing-server-js-worker"
fi
if ynh_exec_warn_less yunohost service status "$app-auth" >/dev/null
then
ynh_script_progression --message="Removing $app-auth service..." --weight=1
yunohost service remove "$app-auth"
fi
if ynh_exec_warn_less yunohost service status "$app-auth-worker" >/dev/null
then
ynh_script_progression --message="Removing $app-auth-worker service..." --weight=1
yunohost service remove "$app-auth-worker"
fi
if ynh_exec_warn_less yunohost service status "$app-api-gateway" >/dev/null
then
ynh_script_progression --message="Removing $app-api-gateway service..." --weight=1
yunohost service remove "$app-api-gateway"
fi

View file

@ -131,16 +131,16 @@ fi
# Everyone can access the app.
if [[ $(ynh_permission_exists --permission="main") && ! $standalone ]]
then
ynh_permission_update --permission="main" --add="visitors" --show_tile="false"
ynh_permission_update --permission="main" --add="visitors" --show_tile="false"
fi
if ! ynh_permission_exists --permission="main"
then
ynh_permission_create --permission="main" --url="/" --allowed="visitors" --show_tile="false"
ynh_permission_create --permission="main" --url="/" --allowed="visitors" --show_tile="false"
fi
# Create a permission if needed
if ! ynh_permission_exists --permission="help"
then
ynh_permission_create --permission="help" --url="/help" --allowed="all_users"
ynh_permission_create --permission="help" --url="/help/" --allowed="all_users" --show_tile="true" --label="Help"
fi
# If final_path doesn't exist, create it
@ -244,7 +244,9 @@ if [ -n $(ynh_app_setting_get --app="$app" --key=port) ]; then
fi
# If old service exsits; remove it
if grep -q "$app:" "/etc/yunohost/services.yml"; then
if ynh_exec_warn_less yunohost service status "$app" >/dev/null
then
ynh_script_progression --message="Removing $app service..." --weight=1
yunohost service remove "$app"
fi
@ -552,17 +554,15 @@ ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Sending a readme for the admin..."
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
config_panel="You can find some specific configurations for this app by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__"
admin_mail_info="\
Standard Notes extensions are hosted with this package.\n\
Please setup the Access-Domain for the extensions in the __URL_TAG1__config-panel__URL_TAG2__$admin_panel/config-panel__URL_TAG3__\
"
echo -e "\
Standard Notes - Syncing Server was successfully upgraded.\n\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url/\n\
$config_panel\n\n\
$admin_mail_info\
Please configure the Standard Notes web app or mobile app to use this syncing server: https://$domain$path_url\n\
\n\
Standard Notes extensions are hosted with this package.\n\
An Help page for setting-up the Standard Notes Server and Extensions have been created under: https://$domain$path_url/help\n\
The Help page is accessible via the Yunohost Portal.\n\
You can deactivate the Help page under: $admin_panel\
" > message
ynh_send_readme_to_admin --app_message="message" --type='upgrade'