From 14c08d51c2991d31fc98fc49eb0b110b348ee145 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:32:47 +0200 Subject: [PATCH 01/13] Create change_url --- scripts/change_url | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 scripts/change_url diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..9d26fb2 --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,56 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# LOAD SETTINGS +#================================================= + +admin_mail=$(ynh_user_get_info --username=$admin --key=username) + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --action="stop" --service_name="${app}" +ynh_systemd_action --action="stop" --service_name="${app}_workers" + +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 + +ynh_change_url_nginx_config + +#================================================= +# MODIFY THE CONFIG FILE +#================================================= +ynh_script_progression --message="Modifying a config file..." --weight=1 + +domain=$new_domain +ynh_add_config --template="../conf/env.production" --destination="$install_dir/config/.env" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting the systemd services..." --weight=15 + +# Start a systemd service +ynh_systemd_action --service_name="${app}" --action="start" +ynh_systemd_action --service_name="${app}_workers" --action="start" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Upgrade of $app completed" --last From 373a3e9f76c28353e9640063574fd54c32c50b84 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 3 Apr 2023 22:07:40 +0200 Subject: [PATCH 02/13] Update tests.toml --- tests.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests.toml b/tests.toml index 9fee290..6445f91 100644 --- a/tests.toml +++ b/tests.toml @@ -6,7 +6,6 @@ test_format = 1.0 # Tests to run # ------------ - exclude = ["change_url"] # ------------------------------- # Default args to use for install From 6a23c095c5b40dd8ca69db1d8e79420d5db0e906 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 3 Apr 2023 22:36:59 +0200 Subject: [PATCH 03/13] no .env changes for now --- scripts/change_url | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 9d26fb2..610ddc3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -35,10 +35,10 @@ ynh_change_url_nginx_config #================================================= # MODIFY THE CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." --weight=1 +#ynh_script_progression --message="Modifying a config file..." --weight=1 -domain=$new_domain -ynh_add_config --template="../conf/env.production" --destination="$install_dir/config/.env" +#domain=$new_domain +#ynh_add_config --template="../conf/env.production" --destination="$install_dir/config/.env" #================================================= # START SYSTEMD SERVICE From 3851b92fb5383b5663e4db0cae6b9eeaba90265b Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:31:17 +0200 Subject: [PATCH 04/13] upgrade to 0.7.15 + some tests/fixes --- config_panel.toml | 2 +- manifest.toml | 10 +++++----- scripts/install | 8 +++++++- scripts/upgrade | 2 +- tests.toml | 3 ++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index eaebfb3..b9ad4bc 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -30,7 +30,7 @@ services = ["__APP__", "__APP___workers"] ask.en = "Change weather provider" ask.fr = "Changer le fournisseur météo" type = "select" - choices = ["", "darksky", "visualcrossing"] + choices = ["", "visualcrossing"] default = "visualcrossing" help.en = "Change your weather provider by choosing one of the proposed ones" help.fr = "Changer votre fournisseur météo en choisissant un de ceux qui vous sont proposés" diff --git a/manifest.toml b/manifest.toml index 09a82a4..92b41b1 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.14~ynh3" +version = "0.7.15~ynh1" maintainers = ["Thovi98"] @@ -17,7 +17,7 @@ admindoc = "https://samr1.github.io/FitTrackee" code = "https://github.com/SamR1/FitTrackee" [integration] -yunohost = ">= 11.1.13" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = true ldap = false @@ -43,10 +43,10 @@ ram.runtime = "50M" [install.weather_provider] ask.en = "(Optional) Choose your weather provider between Darksky and Visual Crossing" ask.fr = "(Optionnel) Choisissez votre fournisseur météo entre Darksky et Visual Crossing" - help.en = "As Darksky is deprecating his api, it is suggested to opt for Visual Crossing" - help.fr = "Comme Darksky déprécie son API, il est suggéré d'opter pour Visual Crossing" + help.en = "Since Fittrackee 0.7.15, only Visual Crossing is supported" + help.fr = "Depuis Fittrackee 0.7.15, seul Visual Crossing est supporté" type = "select" - choices = ["", "darksky", "visualcrossing"] + choices = ["", "visualcrossing"] default = "visualcrossing" optional = true diff --git a/scripts/install b/scripts/install index b35751d..6b66c73 100755 --- a/scripts/install +++ b/scripts/install @@ -9,7 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers -admin_mail=$(ynh_user_get_info --username=$admin --key=username) +admin=$(ynh_user_get_info --username=$admin --key="username") +admin_mail=$(ynh_user_get_info --username="$admin" --key="mail") +admin_password=$(ynh_user_get_info --username="$admin" --key="password") #================================================= # LOGROTATE @@ -68,6 +70,10 @@ popd ynh_exec_warn_less $install_dir/.venv/bin/ftcli db upgrade +ynh_exec_warn_less $install_dir/.venv/bin/ftcli users create $admin --email $admin_mail --password $admin_password + +ynh_exec_warn_less $install_dir/.venv/bin/ftcli users update $admin --set-admin true + #================================================= # System Configuration #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2b0e323..8797ffe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -42,7 +42,7 @@ chown -R $app: "$install_dir" pushd $install_dir mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install fittrackee==$fittrackee_version python-dotenv + PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install -U fittrackee==$fittrackee_version python-dotenv popd #================================================= diff --git a/tests.toml b/tests.toml index 6445f91..a6ac7bc 100644 --- a/tests.toml +++ b/tests.toml @@ -15,4 +15,5 @@ test_format = 1.0 # ------------------------------- # Commits to test upgrade from # ------------------------------- - + + test_upgrade_from.852bf0d.name = "Upgrade from 0.7.14" From b68fba1b559e739453cbf302c917202e2fd88245 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 13 Apr 2023 11:31:20 +0000 Subject: [PATCH 05/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01950af..13d0ca9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ FitTrackee allows you to track your outdoor activities (workouts) from gpx files No mobile app has been developed yet, but several existing mobile apps can store workouts data locally and export them into a gpx file. -**Shipped version:** 0.7.14~ynh3 +**Shipped version:** 0.7.15~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 249b0d8..bdc1e2a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Traqueur d’activités extérieures auto-hébergé 🚴 -**Version incluse :** 0.7.14~ynh3 +**Version incluse :** 0.7.15~ynh1 ## Captures d’écran From ebcb4d744ae32293467f2258713e27e43d12ec0c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:41:38 +0200 Subject: [PATCH 06/13] forgot to update the principal asset x_x --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fbff5af..bcce7ea 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -fittrackee_version="0.7.14" +fittrackee_version="0.7.15" #================================================= # PERSONAL HELPERS From 7f37595f54b3f8e51323e50c506e06741ccbfcae Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:14:11 +0200 Subject: [PATCH 07/13] Remove -U (was for testing purpose) --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8797ffe..2b0e323 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -42,7 +42,7 @@ chown -R $app: "$install_dir" pushd $install_dir mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install -U fittrackee==$fittrackee_version python-dotenv + PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install fittrackee==$fittrackee_version python-dotenv popd #================================================= From 3d1275a43049978aa3f1fb107ddc098c37075435 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:05:03 +0200 Subject: [PATCH 08/13] fix formatting --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6b66c73..91d0964 100755 --- a/scripts/install +++ b/scripts/install @@ -9,9 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers -admin=$(ynh_user_get_info --username=$admin --key="username") -admin_mail=$(ynh_user_get_info --username="$admin" --key="mail") -admin_password=$(ynh_user_get_info --username="$admin" --key="password") +admin=$(ynh_user_get_info --username=$admin --key=username) +admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +admin_password=$(ynh_user_get_info --username=$admin --key=password) #================================================= # LOGROTATE From e7fe9951dbd19f8eec1da2a27c9755b855252138 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 19:51:18 +0200 Subject: [PATCH 09/13] fix password --- manifest.toml | 5 +++++ scripts/change_url | 3 ++- scripts/install | 3 +-- scripts/upgrade | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 92b41b1..36e9c95 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,6 +40,11 @@ ram.runtime = "50M" # this is a generic question - ask strings are automatically handled by Yunohost's core type = "user" + [install.password] + help.en = "Choose a password for your admin user here." + help.fr = "Choisissez un mot de passe pour l’utilisateur admin ici." + type = "password" + [install.weather_provider] ask.en = "(Optional) Choose your weather provider between Darksky and Visual Crossing" ask.fr = "(Optionnel) Choisissez votre fournisseur météo entre Darksky et Visual Crossing" diff --git a/scripts/change_url b/scripts/change_url index 610ddc3..cb2a4b2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -13,7 +13,8 @@ source /usr/share/yunohost/helpers # LOAD SETTINGS #================================================= -admin_mail=$(ynh_user_get_info --username=$admin --key=username) +admin=$(ynh_user_get_info --username=$admin --key=username) +admin_mail=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # STANDARD UPGRADE STEPS diff --git a/scripts/install b/scripts/install index 91d0964..888bbf8 100755 --- a/scripts/install +++ b/scripts/install @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -admin_password=$(ynh_user_get_info --username=$admin --key=password) #================================================= # LOGROTATE @@ -70,7 +69,7 @@ popd ynh_exec_warn_less $install_dir/.venv/bin/ftcli db upgrade -ynh_exec_warn_less $install_dir/.venv/bin/ftcli users create $admin --email $admin_mail --password $admin_password +ynh_exec_warn_less $install_dir/.venv/bin/ftcli users create $admin --email $admin_mail --password $password ynh_exec_warn_less $install_dir/.venv/bin/ftcli users update $admin --set-admin true diff --git a/scripts/upgrade b/scripts/upgrade index 2b0e323..344e90d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,7 +13,8 @@ source /usr/share/yunohost/helpers # LOAD SETTINGS #================================================= -admin_mail=$(ynh_user_get_info --username=$admin --key=username) +admin=$(ynh_user_get_info --username=$admin --key=username) +admin_mail=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK VERSION From 3241afd13bf533322b78fd950438b3b7176cc2cd Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:20:44 +0200 Subject: [PATCH 10/13] =?UTF-8?q?Change=20ADMIN.md=20because=20user=20is?= =?UTF-8?q?=20now=20created=20during=20installation=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/ADMIN.md | 11 ++++------- doc/ADMIN_fr.md | 10 ++++------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index c378810..56c7941 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,14 +1,11 @@ -After the installation, you can create your first user in your browser. +After the installation, you can login with the user and password you choose before the installation. -Then, to change it as admin user, you have to go to cli: +If you have to use the [command line interface (cli)](https://samr1.github.io/FitTrackee/cli.html), you can go like this: ``` pushd $install_dir/ pipenv shell - ftcli users update --set-admin true + ftcli [OPTIONS] COMMAND [ARGS]... ``` - -`$install_dir` has to be changed with the actual FitTrackee installed directory. Most of the time it will be `/var/www/fittrackee/`. - -`` has to be changed with the actual username the account creation has been done. +`$install_dir` has to be changed with the actual FitTrackee installed directory. Most of the time it will be `/var/www/fittrackee/`. \ No newline at end of file diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 7be699c..b4614bb 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,13 +1,11 @@ -Après l’installation, vous pouvez créer un utilisateur via le navigateur. +Après l’installation, vous pouvez vous connecter avec les nom d’utilisateur et mot de passe que vous avez choisis avant l’installation. -Pour faire de cet utilisateur un administrateur, vous devez utiliser la ligne de commande : +Si vous avez besoin d’utiliser la [ligne de commande](https://samr1.github.io/FitTrackee/cli.html) vous pouvez suivre ces étapes : ``` pushd $install_dir/ pipenv shell - ftcli users update --set-admin true + ftcli [OPTIONS] COMMAND [ARGS]... ``` -`$install_dir` doit être modifié en l’adresse du répertoire où FitTrackee est installé. La majorité du temps ce sera `/var/www/fittrackee/`. - -`` doit être remplacé par le nom d’utilisateur du compte créé. +`$install_dir` doit être modifié en l’adresse du répertoire où FitTrackee est installé. La majorité du temps ce sera `/var/www/fittrackee/`. \ No newline at end of file From a15625465afd45e4710667e31207fa440e4fe7b2 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:22:08 +0200 Subject: [PATCH 11/13] add .gitattributes --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cd619b6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +tests.toml.example linguist-language=toml +config_panel.toml.example linguist-language=toml \ No newline at end of file From 1abc9b483bd62ef5356b68e4a7c104077af836c6 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 13 Apr 2023 20:24:54 +0200 Subject: [PATCH 12/13] discovered DESCRIPTION_fr was empty --- doc/DESCRIPTION_fr.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index e69de29..0f0dc90 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,2 @@ +FitTrackee vous permet de suivre vos activités de plein air (séances d'entraînement) à partir de fichiers gpx et de conserver vos données sur votre propre serveur. +Aucune application mobile n'a encore été développée, mais plusieurs applications mobiles existantes peuvent stocker localement les données des séances d'entraînement et les exporter dans un fichier gpx. \ No newline at end of file From d0d7bc93b9785ecc791219960ff4dba877b497ee Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 13 Apr 2023 18:24:57 +0000 Subject: [PATCH 13/13] Auto-update README --- README_fr.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index bdc1e2a..be3424d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,8 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Traqueur d’activités extérieures auto-hébergé 🚴 +FitTrackee vous permet de suivre vos activités de plein air (séances d'entraînement) à partir de fichiers gpx et de conserver vos données sur votre propre serveur. +Aucune application mobile n'a encore été développée, mais plusieurs applications mobiles existantes peuvent stocker localement les données des séances d'entraînement et les exporter dans un fichier gpx. **Version incluse :** 0.7.15~ynh1