From 5b193e75da707c1a653aef0cb269e79206089bf0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 18 Jul 2022 06:14:20 +0000 Subject: [PATCH 01/21] Upgrade to v5.4.10 --- conf/app.src | 4 ++-- manifest.json | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/conf/app.src b/conf/app.src index 59e1e34..b32f024 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.60/invoiceninja.zip -SOURCE_SUM=7c1fc193a6bcca35a6af684694418836baec8e16049fd251ff68837a0d6ce4d2 +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.10/invoiceninja.zip +SOURCE_SUM=82e0ebe0a62db552ef69ef82b9ecb552ec20e29e5b183e424d1e3f9af7978ac5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index a6f96bb..cdf7465 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and email invoices, track payments, expenses, and time tasks", "fr": "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" }, - "version": "5.3.60~ynh1", + "version": "5.4.10~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "Elastic-2.0", @@ -31,7 +31,7 @@ "mysql" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -47,17 +47,20 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["fr", "en"], + "choices": [ + "fr", + "en" + ], "default": "en" }, { "name": "is_public", "type": "boolean", "default": true, - "help": { - "en": "Since your clients should have the possibility to access your invoices, the app is public. If you only want to send invoices via mail (or not at all), deactivate public access", + "help": { + "en": "Since your clients should have the possibility to access your invoices, the app is public. If you only want to send invoices via mail (or not at all), deactivate public access", "fr": "Puisque vos clients doivent avoir la possibilité d'accéder à vos factures, l'application est publique. Si vous souhaitez uniquement envoyer des factures par courrier (ou pas du tout), désactivez l'accès public" - } + } }, { "name": "password", From 7ccd55eb04060623b375e7ac1921dbe8c6cb634d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 18 Jul 2022 06:14:24 +0000 Subject: [PATCH 02/21] Auto-update README --- README.md | 23 ++++++++++++----------- README_fr.md | 29 +++++++++++++++++------------ 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 0529ca0..8528027 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # InvoiceNinja 5 for YunoHost -[![Integration level](https://dash.yunohost.org/integration/invoiceninja5.svg)](https://dash.yunohost.org/appci/app/invoiceninja5) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/invoiceninja5.svg)](https://dash.yunohost.org/appci/app/invoiceninja5) ![Working status](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.maintain.svg) [![Install InvoiceNinja 5 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=invoiceninja5) *[Lire ce readme en français.](./README_fr.md)* @@ -17,13 +17,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Create and email invoices, track payments, expenses, and time tasks -**Shipped version:** 5.3.60~ynh1 +**Shipped version:** 5.4.10~ynh1 **Demo:** https://app.invoiceninja.com/dashboard ## Screenshots -![](./doc/screenshots/Create-Invoices-in-Seconds.png) +![Screenshot of InvoiceNinja 5](./doc/screenshots/Create-Invoices-in-Seconds.png) ## Disclaimers / important information @@ -43,22 +43,23 @@ Invoice Ninja is the the leading self-hosted invoicing platform to create & emai ## Documentation and resources -* Official app website: https://invoiceninja.org -* Official user documentation: https://invoiceninja.github.io/ -* Official admin documentation: https://invoiceninja.github.io/ -* Upstream app code repository: https://github.com/invoiceninja/invoiceninja -* YunoHost documentation for this app: https://yunohost.org/app_invoiceninja5 -* Report a bug: https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues +* Official app website: +* Official user documentation: +* 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/invoiceninja5_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/invoiceninja5_ynh/tree/testing --debug or sudo yunohost app upgrade invoiceninja5 -u https://github.com/YunoHost-Apps/invoiceninja5_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 c3699cc..5fa364d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # InvoiceNinja 5 pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/invoiceninja5.svg)](https://dash.yunohost.org/appci/app/invoiceninja5) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/invoiceninja5.svg)](https://dash.yunohost.org/appci/app/invoiceninja5) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/invoiceninja5.maintain.svg) [![Installer InvoiceNinja 5 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=invoiceninja5) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer InvoiceNinja 5 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.* @@ -13,13 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires -**Version incluse :** 5.3.60~ynh1 +**Version incluse :** 5.4.10~ynh1 **Démo :** https://app.invoiceninja.com/dashboard ## Captures d'écran -![](./doc/screenshots/Create-Invoices-in-Seconds.png) +![Capture d'écran de InvoiceNinja 5](./doc/screenshots/Create-Invoices-in-Seconds.png) ## Avertissements / informations importantes @@ -39,22 +43,23 @@ Invoice Ninja is the the leading self-hosted invoicing platform to create & emai ## Documentations et ressources -* Site officiel de l'app : https://invoiceninja.org -* Documentation officielle utilisateur : https://invoiceninja.github.io/ -* Documentation officielle de l'admin : https://invoiceninja.github.io/ -* Dépôt de code officiel de l'app : https://github.com/invoiceninja/invoiceninja -* Documentation YunoHost pour cette app : https://yunohost.org/app_invoiceninja5 -* Signaler un bug : https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* 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/invoiceninja5_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/invoiceninja5_ynh/tree/testing --debug ou sudo yunohost app upgrade invoiceninja5 -u https://github.com/YunoHost-Apps/invoiceninja5_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 5f2cd1f0d255058d82a4c7df0af2a00b15eaaa3e Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 18 Jul 2022 12:58:25 +0200 Subject: [PATCH 03/21] Send login instructions by mail after installation (#15) --- conf/msg_install | 11 +++ scripts/install | 8 ++ scripts/ynh_send_readme_to_admin__2 | 129 ++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 conf/msg_install create mode 100644 scripts/ynh_send_readme_to_admin__2 diff --git a/conf/msg_install b/conf/msg_install new file mode 100644 index 0000000..cf71919 --- /dev/null +++ b/conf/msg_install @@ -0,0 +1,11 @@ +__APP__ was successfully installed :) + +Please open your __APP__ domain: https://__DOMAIN____PATH_URL__ + +The username is: __EMAIL__ +The password is the administrator one you filled during the installation +The secret is: __API_SECRET__ + +Please note that if you did NOT install the application in public mode, you should go to the Yunohost login portal first to authenticate yourself in order to access to the application. + +If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues diff --git a/scripts/install b/scripts/install index f1b0c19..f96b93a 100755 --- a/scripts/install +++ b/scripts/install @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +source ynh_send_readme_to_admin__2 #================================================= # MANAGE SCRIPT FAILURE @@ -182,6 +183,13 @@ ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# SEND A README FOR THE ADMIN +#================================================= +ynh_script_progression --message="Sending a readme for the admin..." + +ynh_send_readme_to_admin --app_message="../conf/msg_install" --recipients=$email --type='install' + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/ynh_send_readme_to_admin__2 b/scripts/ynh_send_readme_to_admin__2 new file mode 100644 index 0000000..ee571cc --- /dev/null +++ b/scripts/ynh_send_readme_to_admin__2 @@ -0,0 +1,129 @@ +#!/bin/bash + +# Send an email to inform the administrator +# +# usage: ynh_send_readme_to_admin --app_message=app_message [--recipients=recipients] [--type=type] +# | arg: -m --app_message= - The file with the content to send to the administrator. +# | arg: -r, --recipients= - The recipients of this email. Use spaces to separate multiples recipients. - default: root +# example: "root admin@domain" +# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you +# example: "root admin@domain user1 user2" +# | arg: -t, --type= - Type of mail, could be 'backup', 'change_url', 'install', 'remove', 'restore', 'upgrade' +# +# Requires YunoHost version 4.1.0 or higher. +ynh_send_readme_to_admin() { + # Declare an array to define the options of this helper. + declare -Ar args_array=( [m]=app_message= [r]=recipients= [t]=type= ) + local app_message + local recipients + local type + # Manage arguments with getopts + + ynh_handle_getopts_args "$@" + app_message="${app_message:-}" + recipients="${recipients:-root}" + type="${type:-install}" + + # Get the value of admin_mail_html + admin_mail_html=$(ynh_app_setting_get $app admin_mail_html) + admin_mail_html="${admin_mail_html:-0}" + + # Retrieve the email of users + find_mails () { + local list_mails="$1" + local mail + local recipients=" " + # Read each mail in argument + for mail in $list_mails + do + # Keep root or a real email address as it is + if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@" + then + recipients="$recipients $mail" + else + # But replace an user name without a domain after by its email + if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null) + then + recipients="$recipients $mail" + fi + fi + done + echo "$recipients" + } + recipients=$(find_mails "$recipients") + + # Subject base + local mail_subject="☁️🆈🅽🅷☁️: \`$app\`" + + # Adapt the subject according to the type of mail required. + if [ "$type" = "backup" ]; then + mail_subject="$mail_subject has just been backup." + elif [ "$type" = "change_url" ]; then + mail_subject="$mail_subject has just been moved to a new URL!" + elif [ "$type" = "remove" ]; then + mail_subject="$mail_subject has just been removed!" + elif [ "$type" = "restore" ]; then + mail_subject="$mail_subject has just been restored!" + elif [ "$type" = "upgrade" ]; then + mail_subject="$mail_subject has just been upgraded!" + else # install + mail_subject="$mail_subject has just been installed!" + fi + + ynh_add_config --template="$app_message" --destination="../conf/msg__to_send" + + ynh_delete_file_checksum --file="../conf/msg__to_send" + + local mail_message="This is an automated message from your beloved YunoHost server. + +Specific information for the application $app. + +$(cat "../conf/msg__to_send")" + + # Store the message into a file for further modifications. + echo "$mail_message" > mail_to_send + + # If a html email is required. Apply html tags to the message. + if [ "$admin_mail_html" -eq 1 ] + then + # Insert 'br' tags at each ending of lines. + ynh_replace_string "$" "
" mail_to_send + + # Insert starting HTML tags + sed --in-place '1s@^@\n\n\n\n@' mail_to_send + + # Keep tabulations + ynh_replace_string " " "\ \ " mail_to_send + ynh_replace_string "\t" "\ \ " mail_to_send + + # Insert url links tags + ynh_replace_string "__URL_TAG1__\(.*\)__URL_TAG2__\(.*\)__URL_TAG3__" "\1" mail_to_send + + # Insert finishing HTML tags + echo -e "\n\n" >> mail_to_send + + # Otherwise, remove tags to keep a plain text. + else + # Remove URL tags + ynh_replace_string "__URL_TAG[1,3]__" "" mail_to_send + ynh_replace_string "__URL_TAG2__" ": " mail_to_send + fi + + # Define binary to use for mail command + if [ -e /usr/bin/bsd-mailx ] + then + local mail_bin=/usr/bin/bsd-mailx + else + local mail_bin=/usr/bin/mail.mailutils + fi + + if [ "$admin_mail_html" -eq 1 ] + then + content_type="text/html" + else + content_type="text/plain" + fi + + # Send the email to the recipients + cat mail_to_send | $mail_bin -a "Content-Type: $content_type; charset=UTF-8" -s "$mail_subject" "$recipients" +} From 679f2531b4814265d1a45bf4c61d5e4685ab4d13 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Mon, 18 Jul 2022 17:46:53 +0200 Subject: [PATCH 04/21] change source order --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f96b93a..a342c19 100755 --- a/scripts/install +++ b/scripts/install @@ -6,9 +6,9 @@ # IMPORT GENERIC HELPERS #================================================= +source ynh_send_readme_to_admin__2 source _common.sh source /usr/share/yunohost/helpers -source ynh_send_readme_to_admin__2 #================================================= # MANAGE SCRIPT FAILURE From 75946e65e2617b4003dcf436c81b93a462bac276 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 20 Jul 2022 06:13:13 +0000 Subject: [PATCH 05/21] Upgrade to v5.4.11 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index b32f024..9020c93 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.10/invoiceninja.zip -SOURCE_SUM=82e0ebe0a62db552ef69ef82b9ecb552ec20e29e5b183e424d1e3f9af7978ac5 +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.11/invoiceninja.zip +SOURCE_SUM=3f07de119ac38f29a0d6095ecb044cf0d85327049c501bae34b5c58f78e308c1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index cdf7465..4f4cfdb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and email invoices, track payments, expenses, and time tasks", "fr": "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" }, - "version": "5.4.10~ynh1", + "version": "5.4.11~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "Elastic-2.0", From 9e6d7775af8e506fb7b3481156a6b7bd3ccfa7b1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 20 Jul 2022 06:13:18 +0000 Subject: [PATCH 06/21] 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 8528027..e4f2c9a 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 Create and email invoices, track payments, expenses, and time tasks -**Shipped version:** 5.4.10~ynh1 +**Shipped version:** 5.4.11~ynh1 **Demo:** https://app.invoiceninja.com/dashboard diff --git a/README_fr.md b/README_fr.md index 5fa364d..c59e316 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires -**Version incluse :** 5.4.10~ynh1 +**Version incluse :** 5.4.11~ynh1 **Démo :** https://app.invoiceninja.com/dashboard From c1b9df5d8ea8bc1a6db69dd2928218706259673e Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Fri, 22 Jul 2022 11:46:55 +0200 Subject: [PATCH 07/21] Update msg_install --- conf/msg_install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/msg_install b/conf/msg_install index cf71919..9fdf963 100644 --- a/conf/msg_install +++ b/conf/msg_install @@ -8,4 +8,5 @@ The secret is: __API_SECRET__ Please note that if you did NOT install the application in public mode, you should go to the Yunohost login portal first to authenticate yourself in order to access to the application. -If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues +If you are facing any problems, head to the forums: https://forum.yunohost.org/ +If you want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/invoiceninja5_ynh/issues From ed641c902986c6a6b6ef962bd3baf99dc69ac308 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Fri, 22 Jul 2022 11:47:57 +0200 Subject: [PATCH 08/21] Update ynh_send_readme_to_admin__2 --- scripts/ynh_send_readme_to_admin__2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ynh_send_readme_to_admin__2 b/scripts/ynh_send_readme_to_admin__2 index ee571cc..f1e53ec 100644 --- a/scripts/ynh_send_readme_to_admin__2 +++ b/scripts/ynh_send_readme_to_admin__2 @@ -53,7 +53,7 @@ ynh_send_readme_to_admin() { recipients=$(find_mails "$recipients") # Subject base - local mail_subject="☁️🆈🅽🅷☁️: \`$app\`" + local mail_subject="\`$app\`" # Adapt the subject according to the type of mail required. if [ "$type" = "backup" ]; then From e571bc6777afc900b232a24e5af84184e0ad6842 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 23 Jul 2022 06:12:38 +0000 Subject: [PATCH 09/21] Upgrade to v5.4.12 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 9020c93..a5b9a9c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.11/invoiceninja.zip -SOURCE_SUM=3f07de119ac38f29a0d6095ecb044cf0d85327049c501bae34b5c58f78e308c1 +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.12/invoiceninja.zip +SOURCE_SUM=0426a014d26b0aa6102c454412e04c04092b8ed8dc65c236a78b4ef5e9d1e577 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 4f4cfdb..fdaa033 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and email invoices, track payments, expenses, and time tasks", "fr": "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" }, - "version": "5.4.11~ynh1", + "version": "5.4.12~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "Elastic-2.0", From 7e3d28b2b8cf5636df6b563962372c3c6594ecd0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 23 Jul 2022 06:12:45 +0000 Subject: [PATCH 10/21] 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 e4f2c9a..6e21ac2 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 Create and email invoices, track payments, expenses, and time tasks -**Shipped version:** 5.4.11~ynh1 +**Shipped version:** 5.4.12~ynh1 **Demo:** https://app.invoiceninja.com/dashboard diff --git a/README_fr.md b/README_fr.md index c59e316..208a9cf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires -**Version incluse :** 5.4.11~ynh1 +**Version incluse :** 5.4.12~ynh1 **Démo :** https://app.invoiceninja.com/dashboard From 5cd1f84e1c438c320f6659016905257f98dbebc4 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sat, 23 Jul 2022 14:11:45 +0200 Subject: [PATCH 11/21] fix upgrade --- scripts/upgrade | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index cb7e9e3..25148b0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,17 +131,21 @@ fi ynh_script_progression --message="Upgrading the database..." pushd "$final_path" - # Put the application into maintenance mode - php$phpversion artisan down --no-interaction --verbose - - # Optimize the framework for better performance - php$phpversion artisan optimize --no-interaction --verbose + # Clear caches + # https://github.com/invoiceninja/invoiceninja/issues/7397 + rm -fr bootstrap/cache/* + rm -fr storage/framework/cache/* + rm -fr storage/framework/sessions/* # Run the database migrations php$phpversion artisan migrate --force --no-interaction --verbose - # Bring the application out of maintenance mode - php$phpversion artisan up --no-interaction --verbose + # Optimize the framework for better performance + php$phpversion artisan optimize --no-interaction --verbose + + # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) + php$phpversion artisan view:clear + php$phpversion artisan cache:clear popd chmod 750 "$final_path" From eeb30a648924723bf583043a41ac3d2ee409d31e Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Mon, 25 Jul 2022 08:31:49 +0200 Subject: [PATCH 12/21] Use ynh_secure_remove --- scripts/upgrade | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 25148b0..e089a49 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,9 +133,7 @@ ynh_script_progression --message="Upgrading the database..." pushd "$final_path" # Clear caches # https://github.com/invoiceninja/invoiceninja/issues/7397 - rm -fr bootstrap/cache/* - rm -fr storage/framework/cache/* - rm -fr storage/framework/sessions/* + ynh_secure_remove bootstrap/cache/* storage/framework/cache/* storage/framework/sessions/* # Run the database migrations php$phpversion artisan migrate --force --no-interaction --verbose From 16a858c487e6e3ed8ba273446248bce156ddbe2e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 26 Jul 2022 06:13:42 +0000 Subject: [PATCH 13/21] Upgrade to v5.5.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index a5b9a9c..955244d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.12/invoiceninja.zip -SOURCE_SUM=0426a014d26b0aa6102c454412e04c04092b8ed8dc65c236a78b4ef5e9d1e577 +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.5.2/invoiceninja.zip +SOURCE_SUM=64647f6960b64ac42633b65c6b8c108544e2dc845117d3c9f921792474df4ef9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index fdaa033..a03e68a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and email invoices, track payments, expenses, and time tasks", "fr": "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" }, - "version": "5.4.12~ynh1", + "version": "5.5.2~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "Elastic-2.0", From a226b9610f2c22015681134e283e5f301bc8619e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 26 Jul 2022 06:13:45 +0000 Subject: [PATCH 14/21] 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 6e21ac2..f9d67d9 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 Create and email invoices, track payments, expenses, and time tasks -**Shipped version:** 5.4.12~ynh1 +**Shipped version:** 5.5.2~ynh1 **Demo:** https://app.invoiceninja.com/dashboard diff --git a/README_fr.md b/README_fr.md index 208a9cf..131a22a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires -**Version incluse :** 5.4.12~ynh1 +**Version incluse :** 5.5.2~ynh1 **Démo :** https://app.invoiceninja.com/dashboard From 57aeeb840526f5c988c86111a6d62f62441548c2 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Tue, 26 Jul 2022 13:32:18 +0200 Subject: [PATCH 15/21] fix secure remove usage --- scripts/upgrade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e089a49..4307400 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,7 +133,9 @@ ynh_script_progression --message="Upgrading the database..." pushd "$final_path" # Clear caches # https://github.com/invoiceninja/invoiceninja/issues/7397 - ynh_secure_remove bootstrap/cache/* storage/framework/cache/* storage/framework/sessions/* + ynh_secure_remove --file=bootstrap/cache/* + ynh_secure_remove --file=storage/framework/cache/* + ynh_secure_remove --file=storage/framework/sessions/* # Run the database migrations php$phpversion artisan migrate --force --no-interaction --verbose From 552d5b51b68f7ffcc69087394b35628ca7998196 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sat, 23 Jul 2022 14:12:12 +0200 Subject: [PATCH 16/21] update to php 8.1 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ccb44ff..76aefb7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.4" +YNH_PHP_VERSION="8.1" # dependencies used by the app From 7729fdc3234607babd69dee59697e2c2f836f0bd Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sat, 23 Jul 2022 14:22:03 +0200 Subject: [PATCH 17/21] remove json extension as it is included in php8.1 now --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 76aefb7..0837b20 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,7 +8,7 @@ YNH_PHP_VERSION="8.1" # dependencies used by the app -pkg_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libxcomposite1 libxrandr2 libasound2" +pkg_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libxcomposite1 libxrandr2 libasound2" #================================================= # PERSONAL HELPERS From 9899b25f6b74d684c3475bfc669e429010ca2b08 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 26 Jul 2022 06:13:42 +0000 Subject: [PATCH 18/21] Upgrade to v5.5.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index a5b9a9c..955244d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.4.12/invoiceninja.zip -SOURCE_SUM=0426a014d26b0aa6102c454412e04c04092b8ed8dc65c236a78b4ef5e9d1e577 +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.5.2/invoiceninja.zip +SOURCE_SUM=64647f6960b64ac42633b65c6b8c108544e2dc845117d3c9f921792474df4ef9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index fdaa033..a03e68a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and email invoices, track payments, expenses, and time tasks", "fr": "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" }, - "version": "5.4.12~ynh1", + "version": "5.5.2~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "Elastic-2.0", From e223f9aa1463833217e84b52d0c6aa0874ff9ec9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 26 Jul 2022 06:13:45 +0000 Subject: [PATCH 19/21] 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 6e21ac2..f9d67d9 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 Create and email invoices, track payments, expenses, and time tasks -**Shipped version:** 5.4.12~ynh1 +**Shipped version:** 5.5.2~ynh1 **Demo:** https://app.invoiceninja.com/dashboard diff --git a/README_fr.md b/README_fr.md index 208a9cf..131a22a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires -**Version incluse :** 5.4.12~ynh1 +**Version incluse :** 5.5.2~ynh1 **Démo :** https://app.invoiceninja.com/dashboard From 793cda03735da09368084b5300769689e470c302 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Tue, 26 Jul 2022 21:12:41 +0200 Subject: [PATCH 20/21] use correct php-var when upgrading --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4307400..50b56fb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) From 4c1d3398f50f08dec77f32507a6164469fabe0a8 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Tue, 26 Jul 2022 21:13:04 +0200 Subject: [PATCH 21/21] finally use ynh_secure_remove correctly --- scripts/upgrade | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 50b56fb..0d98727 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,9 +133,15 @@ ynh_script_progression --message="Upgrading the database..." pushd "$final_path" # Clear caches # https://github.com/invoiceninja/invoiceninja/issues/7397 - ynh_secure_remove --file=bootstrap/cache/* - ynh_secure_remove --file=storage/framework/cache/* - ynh_secure_remove --file=storage/framework/sessions/* + ynh_secure_remove --file=$final_path/bootstrap/cache/ + ynh_secure_remove --file=$final_path/storage/framework/cache/ + ynh_secure_remove --file=$final_path/storage/framework/sessions/ + + mkdir -p $final_path/bootstrap/cache/ $final_path/storage/framework/cache/ $final_path/storage/framework/sessions/ + + # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) + php$phpversion artisan view:clear + php$phpversion artisan cache:clear # Run the database migrations php$phpversion artisan migrate --force --no-interaction --verbose