From a4906898da46c9b0e15ad8644ed152c6ec458db4 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:18:06 +0100 Subject: [PATCH 1/6] some cleaning --- scripts/install | 18 ++++++++---------- scripts/restore | 2 +- scripts/upgrade | 4 +--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index 5a8a210..97bdcc9 100755 --- a/scripts/install +++ b/scripts/install @@ -14,6 +14,13 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail) ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key +# Configure redis +redis_db=$(ynh_redis_get_free_db) +ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" + +# key for the .env __KEY__ +key=$(ynh_string_random --length=45 | base64) +ynh_app_setting_set --app=$app --key=key --value=$key #================================================= # LOGROTATE @@ -32,19 +39,10 @@ chown -R $app:www-data /var/log/$app/ # CONFIGURE THE INSTALL SCRIPT #================================================= -# Configure redis -redis_db=$(ynh_redis_get_free_db) -ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" - - -# key for the .env __KEY__ -key=$(ynh_string_random --length=45 | base64) -ynh_app_setting_set --app=$app --key=key --value=$key - ynh_script_progression --message="Setting up source files..." --weight=64 ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env" -chmod 600 $install_dir/.env +chmod 400 $install_dir/.env chown -R $app:www-data "$install_dir" diff --git a/scripts/restore b/scripts/restore index 0507f48..9e8c0f5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,7 +45,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$install_dir" -chmod 600 $install_dir/.env +chmod 400 $install_dir/.env chown -R $app: "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 80a237b..c2575fe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ ynh_script_progression --message="Installing service script..." --weight=1 redis_db=$(ynh_redis_get_free_db) ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env" -chmod 600 $install_dir/.env +chmod 400 $install_dir/.env chown $app: "$install_dir/.env" #================================================= @@ -70,8 +70,6 @@ chown $app: "$install_dir/.env" #================================================= ynh_script_progression --message="Installing Python dependencies..." --weight=3 -ynh_secure_remove $install_dir/.venv - if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "armel" ] then # Install rustup is not already installed From da0e69c9bd7ecec6662f1023a8f5f9669b64b8f8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 24 Feb 2024 09:18:10 +0000 Subject: [PATCH 2/6] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d6fa51..0a5e037 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -46,4 +46,4 @@ or sudo yunohost app upgrade fittrackee -u https://github.com/YunoHost-Apps/fittrackee_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 1743b28..773261d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From fbd1a737817239d5575fc7329a049d401b0305b4 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:32:45 +0100 Subject: [PATCH 3/6] cleaning --- scripts/change_url | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 63342db..b945c14 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,6 +16,21 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +if [ -z "${weather_api_provider:-}" ]; then + weather_api_provider=$weather_provider + ynh_app_setting_set --app=$app --key=weather_api_provider --value=$weather_api_provider +fi + +if [ -z "${weather_api_key:-}" ]; then + weather_api_key=$weather_key + ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key +fi + +if [ -z "${$redis_db:-}" ]; then + redis_db=$(ynh_redis_get_free_db) + ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= From dabcadfc103e77be429174eb78da32e33e112cf5 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:36:18 +0100 Subject: [PATCH 4/6] fix --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index b945c14..4c3ffde 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -26,7 +26,7 @@ if [ -z "${weather_api_key:-}" ]; then ynh_app_setting_set --app=$app --key=weather_api_key --value=$weather_api_key fi -if [ -z "${$redis_db:-}" ]; then +if [ -z "${redis_db:-}" ]; then redis_db=$(ynh_redis_get_free_db) ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" fi From 744094d290d83a33164185026456bcfa299e95bc Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 11 Mar 2024 04:00:25 +0100 Subject: [PATCH 5/6] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 80d8e56..7cd33d3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "FitTrackee" description.en = "Self-hosted outdoor activity tracker 🚴" description.fr = "Traqueur d’activités extérieures auto-hébergé 🚴" -version = "0.7.31~ynh1" +version = "0.7.32~ynh1" maintainers = ["Thovi98"] From d9ad6eb4c140f932280b1cd0d61ed39b42dc5ffd Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:46:12 +0100 Subject: [PATCH 6/6] remove broken tests --- tests.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests.toml b/tests.toml index ab2aa36..b3de511 100644 --- a/tests.toml +++ b/tests.toml @@ -16,9 +16,4 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.d682f12.name = "0.7.25~ynh3" - test_upgrade_from.e48197d.name = "0.7.26" - test_upgrade_from.33f7a78.name = "0.7.27" - test_upgrade_from.ac79c26.name = "0.7.28" - test_upgrade_from.f52002b.name = "0.7.29" - test_upgrade_from.520a85f.name = "0.7.30" \ No newline at end of file +