From c8749da716676e9b29db38229d68e666900c60b5 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Fri, 15 Apr 2022 17:42:21 +0200 Subject: [PATCH 1/8] Update change_url --- scripts/change_url | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index cf801f6..f6cdf88 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -108,8 +108,21 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -# ... +# UPDATE A CONFIG FILE #================================================= +ynh_script_progression --message="Updating a configuration file..." + +ynh_add_config --template="../conf/gunicorn.py" --destination="$final_path/gunicorn.py" +ynh_add_config --template="../conf/settings.py" --destination="$final_path/settings.py" + +for price in $(echo $prices | sed "s/,/ /"); do + frequency=$(echo $price | cut -d/ -f1) + currency=$(echo $price | cut -d/ -f2) + price_id=$(echo $price | cut -d/ -f3) + echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$final_path/settings.py" +done + +ynh_store_file_checksum --file="$final_path/settings.py" #================================================= # GENERIC FINALISATION From 810b8ea2102af487374cc5190d16ee8dc77873e7 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 16 Apr 2022 19:43:58 +0200 Subject: [PATCH 2/8] Load settings in change_url script --- scripts/change_url | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index f6cdf88..8b84588 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,10 +29,15 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) +project_name=$(ynh_app_setting_get --app=$app --key=project_name) +contact_url=$(ynh_app_setting_get --app=$app --key=contact_url) +logo=$(ynh_app_setting_get --app=$app --key=logo) +favicon=$(ynh_app_setting_get --app=$app --key=favicon) +publishable_key=$(ynh_app_setting_get --app=$app --key=publishable_key) +secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) +prices=$(ynh_app_setting_get --app=$app --key=prices) +secret=$(ynh_app_setting_get --app=$app --key=secret) +csrf_key=$(ynh_app_setting_get --app=$app --key=csrf_key) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From 63074239c52dd9e99d2c29aeb4505858c243f3f9 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 16 Apr 2022 21:42:42 +0200 Subject: [PATCH 3/8] Load domain in change_url script --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index 8b84588..b66734a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -38,6 +38,7 @@ secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) prices=$(ynh_app_setting_get --app=$app --key=prices) secret=$(ynh_app_setting_get --app=$app --key=secret) csrf_key=$(ynh_app_setting_get --app=$app --key=csrf_key) +domain=$new_domain #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From a4e370cdf7df2eb3fc047cb2346bb318b0d8b5d1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 16 May 2022 18:23:29 +0200 Subject: [PATCH 4/8] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7130ec5..c5a5dd2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A simple donation form with stripe", "fr": "Un simple formulaire de don avec stripe" }, - "version": "1.0.1~ynh2", + "version": "1.0.1~ynh3", "url": "https://github.com/YunoHost/pepettes/", "upstream": { "license": "MIT", From d86c2b8ad2ddb88d24231d4a7bd891f80728c0af Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 16 May 2022 16:23:31 +0000 Subject: [PATCH 5/8] 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 9f65e3b..cb5d2c6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in A simple donation form with stripe -**Shipped version:** 1.0.1~ynh2 +**Shipped version:** 1.0.1~ynh3 **Demo:** https://donate.yunohost.org diff --git a/README_fr.md b/README_fr.md index fef229a..dc83bd5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Un simple formulaire de don avec stripe -**Version incluse :** 1.0.1~ynh2 +**Version incluse :** 1.0.1~ynh3 **Démo :** https://donate.yunohost.org From f63f11dfa7d9083abd28cbd4e5d00098406c0a71 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 29 May 2022 19:06:31 +0200 Subject: [PATCH 6/8] Missing port --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index b66734a..7dea6f1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -38,6 +38,7 @@ secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) prices=$(ynh_app_setting_get --app=$app --key=prices) secret=$(ynh_app_setting_get --app=$app --key=secret) csrf_key=$(ynh_app_setting_get --app=$app --key=csrf_key) +port=$(ynh_app_setting_get --app=$app --key=port) domain=$new_domain #================================================= From ea73446367600ae9e427104e3dc34ee8bc3def94 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 29 May 2022 17:06:37 +0000 Subject: [PATCH 7/8] Auto-update README --- README.md | 16 ++++++++-------- README_fr.md | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cb5d2c6..1f139fa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Pepettes for YunoHost -[![Integration level](https://dash.yunohost.org/integration/pepettes.svg)](https://dash.yunohost.org/appci/app/pepettes) ![](https://ci-apps.yunohost.org/ci/badges/pepettes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pepettes.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/pepettes.svg)](https://dash.yunohost.org/appci/app/pepettes) ![Working status](https://ci-apps.yunohost.org/ci/badges/pepettes.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/pepettes.maintain.svg) [![Install Pepettes with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pepettes) *[Lire ce readme en français.](./README_fr.md)* @@ -20,27 +20,27 @@ A simple donation form with stripe **Shipped version:** 1.0.1~ynh3 **Demo:** https://donate.yunohost.org - ## Disclaimers / important information This app may be configured through the `settings.py` after installation. ## Documentation and resources -* Official admin documentation: https://github.com/YunoHost/pepettes/blob/main/README.md -* Upstream app code repository: https://github.com/YunoHost/pepettes/ -* YunoHost documentation for this app: https://yunohost.org/app_pepettes -* Report a bug: https://github.com/YunoHost-Apps/pepettes_ynh/issues +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug or sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index dc83bd5..2f14d75 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Pepettes pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/pepettes.svg)](https://dash.yunohost.org/appci/app/pepettes) ![](https://ci-apps.yunohost.org/ci/badges/pepettes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pepettes.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/pepettes.svg)](https://dash.yunohost.org/appci/app/pepettes) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/pepettes.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/pepettes.maintain.svg) [![Installer Pepettes avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pepettes) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Pepettes rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -16,27 +20,27 @@ Un simple formulaire de don avec stripe **Version incluse :** 1.0.1~ynh3 **Démo :** https://donate.yunohost.org - ## Avertissements / informations importantes This app may be configured through the `settings.py` after installation. ## Documentations et ressources -* Documentation officielle de l'admin : https://github.com/YunoHost/pepettes/blob/main/README.md -* Dépôt de code officiel de l'app : https://github.com/YunoHost/pepettes/ -* Documentation YunoHost pour cette app : https://yunohost.org/app_pepettes -* Signaler un bug : https://github.com/YunoHost-Apps/pepettes_ynh/issues +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug ou sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 67750eac825f89cd5b93aeb9ae8833d6aa1cca3b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 2 Jun 2022 23:40:58 +0200 Subject: [PATCH 8/8] Update change_url --- scripts/change_url | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 7dea6f1..e49ddfb 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -131,6 +131,10 @@ done ynh_store_file_checksum --file="$final_path/settings.py" +# Set permissions to app files +chown -R $app:www-data $final_path +chmod o=--- $final_path + #================================================= # GENERIC FINALISATION #=================================================