diff --git a/README.md b/README.md index c1942a4..3334ec4 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/README_es.md b/README_es.md index 6ec417b..55316d0 100644 --- a/README_es.md +++ b/README_es.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/README_eu.md b/README_eu.md index 9a86278..038e474 100644 --- a/README_eu.md +++ b/README_eu.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/README_fr.md b/README_fr.md index e18605a..88e27f0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Plus d'information sur les fonctionnalités sont disponibles ici : diff --git a/README_gl.md b/README_gl.md index 552a913..f83f651 100644 --- a/README_gl.md +++ b/README_gl.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/README_id.md b/README_id.md index 9729683..e5a40d5 100644 --- a/README_id.md +++ b/README_id.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 064a69a..ecc2eff 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -32,7 +32,7 @@ More about the features can be found here: diff --git a/conf/default.env b/conf/default.env index a57a4a0..1c3442e 100644 --- a/conf/default.env +++ b/conf/default.env @@ -1,7 +1,6 @@ # This file is not meant to be edited. # Please place your environment variables in __DATA_DIR__/custom.env file APP_HOME_URL=https://__DOMAIN__ -APP_HOME_INTERNAL_URL=http://localhost:__PORT__ GRIST_ORG_IN_PATH=true GRIST_SANDBOX_FLAVOR=pyodide GRIST_HIDE_UI_ELEMENTS=billing,sendToDrive @@ -11,10 +10,12 @@ REDIS_URL=redis://localhost:6379/__REDIS_DB__ GRIST_DATA_DIR=__DATA_DIR__/docs/ TYPEORM_DATABASE=__DATA_DIR__/home.db PORT=__PORT__ +GRIST_DEFAULT_EMAIL=__ADMIN_EMAIL__ +GRIST_SESSION_SECRET=__SESSION_SECRET__ # Authentication GRIST_FORWARD_AUTH_HEADER=Email GRIST_IGNORE_SESSION=0 # SSOWat Removes the authentication headers: https://github.com/YunoHost/SSOwat/blob/38a6f23f3805a098b4ab757ff002f3a5fb3c377a/helpers.lua#L422-L425 -# Widget iist + GRIST_WIDGET_LIST_URL=https://github.com/gristlabs/grist-widget/releases/download/latest/manifest.json diff --git a/manifest.toml b/manifest.toml index d64b228..f91cb64 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Grist" description.en = "Modern relational spreadsheet" description.fr = "Feuille de calcul relationnelle moderne" -version = "1.1.16~ynh1" +version = "1.1.17~ynh2" maintainers = ["fflorent"] @@ -56,8 +56,8 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/gristlabs/grist-core/archive/refs/tags/v1.1.16.tar.gz" - sha256 = "6f12ada699f5f14e587b677b6b43adde86c09698718b59332f975e8eddb44ed7" + url = "https://github.com/gristlabs/grist-core/archive/refs/tags/v1.1.17.tar.gz" + sha256 = "14049bc7cd2ced153fb7c5e547018ae597d7a4010f96e0c7583a0d2e953e0dc0" autoupdate.strategy = "latest_github_release" diff --git a/scripts/change_url b/scripts/change_url index 16e8c95..687c182 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -32,6 +32,9 @@ ynh_script_progression --message="Updating env configuration file..." --weight=1 domain="$new_domain" path="$new_path" +admin_email=$(ynh_user_get_info --username=$admin --key=mail) +redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) +session_secret=$(ynh_app_setting_get --app=$app --key=session_secret) ynh_add_config --template="default.env" --destination="$install_dir/default.env" #================================================= diff --git a/scripts/install b/scripts/install index 3433d51..625465c 100755 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,14 @@ source _common.sh source /usr/share/yunohost/helpers + +#================================================= +# INITIALIZE AND STORE SETTINGS +#================================================= + +session_secret=$(ynh_string_random --length=32) +ynh_app_setting_set --app=$app --key=session_secret --value=$session_secret + #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= @@ -71,6 +79,7 @@ ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 +admin_email=$(ynh_user_get_info --username=$admin --key=mail) ynh_add_config --template="default.env" --destination="$install_dir/default.env" ynh_add_config --template="custom.env" --destination="$data_dir/custom.env" diff --git a/scripts/upgrade b/scripts/upgrade index 52e27fd..6113c1c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source _common.sh source /usr/share/yunohost/helpers redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) - +session_secret=$(ynh_app_setting_get --app=$app --key=session_secret) upgrade_type=$(ynh_check_app_version_changed) @@ -23,6 +23,15 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= + +if [ -z "$session_secret" ]; then + session_secret=$(ynh_string_random --length=32) + ynh_app_setting_set --app=$app --key=session_secret --value=$session_secret +fi + #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -82,14 +91,12 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 +admin_email=$(ynh_user_get_info --username=$admin --key=mail) ynh_add_config --template="default.env" --destination="$install_dir/default.env" chmod 400 "$install_dir/default.env" chown $app:$app "$install_dir/default.env" -chmod 700 "$data_dir/custom.env" -chown $app:$app "$data_dir/custom.env" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/tests.toml b/tests.toml index 9881b4d..1b3a836 100644 --- a/tests.toml +++ b/tests.toml @@ -10,4 +10,4 @@ test_format = 1.0 exclude = ["install.subdir", "install.nourl"] - test_upgrade_from.c98a6fb2.name = "Upgrade from 1.1.10" + test_upgrade_from.9fcb488.name = "Upgrade from 1.1.13"