From 4fd1c7846ce4b819f57af31a8d08912915327af0 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Wed, 22 Jul 2020 21:51:27 +0200 Subject: [PATCH 1/8] use local phantomjs installation --- scripts/_common.sh | 2 +- scripts/install | 9 +++++++++ scripts/remove | 8 ++++++++ scripts/restore | 8 ++++++++ scripts/upgrade | 7 +++++++ sources/extra_files/app/.env | 2 +- 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ecd263f..7a08e73 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="" +pkg_dependencies="phantomjs" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index d3df91d..b3627ec 100755 --- a/scripts/install +++ b/scripts/install @@ -72,6 +72,15 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name + +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/remove b/scripts/remove index adfc93a..b82d4b9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -32,6 +32,14 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 9005ecc..124a46e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -94,6 +94,14 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 46ac006..6559530 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,6 +89,13 @@ then ynh_setup_source --dest_dir="$final_path" fi +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/sources/extra_files/app/.env b/sources/extra_files/app/.env index f36d9e7..2176a5b 100644 --- a/sources/extra_files/app/.env +++ b/sources/extra_files/app/.env @@ -25,7 +25,7 @@ MAIL_FROM_NAME="__MAIL_FROM_NAME__" MAIL_FROM_ADDRESS=__MAIL_FROM_ADDRESS__ MAIL_PASSWORD= -PHANTOMJS_CLOUD_KEY=a-demo-key-with-low-quota-per-ip-address +PHANTOMJS_BIN_PATH=/usr/bin/phantomjs PHANTOMJS_SECRET=__PHANTOMJS_KEY__ MAILGUN_DOMAIN= From aca0412acb0babd61972d458f57775c90fe57912 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 22 Dec 2021 00:00:32 +0100 Subject: [PATCH 2/8] Fix linter warnings --- manifest.json | 6 ++---- scripts/restore | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index d992ea3..eb53c55 100644 --- a/manifest.json +++ b/manifest.json @@ -33,8 +33,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -44,8 +43,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "language", diff --git a/scripts/restore b/scripts/restore index d027dc9..f39f926 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,10 +38,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS From d6f6a7938a8ee1f391288632826f147ea94486b0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 22 Dec 2021 08:20:06 +0100 Subject: [PATCH 3/8] v4.5.47 --- check_process | 2 +- conf/app.src | 6 +++--- conf/nginx.conf | 5 ----- manifest.json | 7 ++++--- scripts/install | 2 -- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/check_process b/check_process index 8de3a05..0ff4a7c 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_public=0 upgrade=1 # 4.5.18~ynh1 - upgrade=1 from_commit=572f98be58975399c5e7fc7d435a4ac5b78765da + #upgrade=1 from_commit=572f98be58975399c5e7fc7d435a4ac5b78765da backup_restore=1 multi_instance=1 port_already_use=0 diff --git a/conf/app.src b/conf/app.src index 4e6a23c..9d7000a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://download.invoiceninja.com/ninja-v4.5.45.zip -SOURCE_SUM=750d8a841621b327e0d66ec22fbd6fa44c018e7b0986222aec197d57374e5b82 +SOURCE_URL=https://download.invoiceninja.com/ninja-v4.5.47.zip +SOURCE_SUM=851e7a546ba1ccb8699dd818c14ce4a3192b521c82aef90e695681818649da71 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=invoiceninja-v4.5.45.zip +SOURCE_FILENAME=invoiceninja-v4.5.47.zip diff --git a/conf/nginx.conf b/conf/nginx.conf index a0c8abf..62bca5a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,11 +9,6 @@ location ^~ __PATH__/ { rewrite ^ __PATH__/index.php; } - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Add headers to serve security related headers more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; more_set_headers "X-Content-Type-Options: nosniff"; diff --git a/manifest.json b/manifest.json index eb53c55..05de4e0 100644 --- a/manifest.json +++ b/manifest.json @@ -3,9 +3,10 @@ "id": "invoiceninja", "packaging_format": 1, "description": { - "en": "Create and email invoices, track payments and expenses, and time tasks" + "en": "Create and email invoices, track payments and expenses", + "fr": "Créez et envoyez des factures par e-mail, suivez les paiements" }, - "version": "4.5.45~ynh1", + "version": "4.5.47~ynh1", "url": "https://invoiceninja.org", "upstream": { "license": "AAL", @@ -21,7 +22,7 @@ "url": "https://github.com/YunoHost-Apps/invoiceninja_ynh/" }, "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index db7391f..6c5ab1f 100755 --- a/scripts/install +++ b/scripts/install @@ -84,7 +84,6 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - #================================================= # INSTALL DEPENDENCIES #================================================= @@ -92,7 +91,6 @@ ynh_script_progression --message="Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 0cc27eacedf898af311596477ea990edc81ea8d1 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 22 Dec 2021 07:20:11 +0000 Subject: [PATCH 4/8] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d4c3a9e..af02529 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Create and email invoices, track payments and expenses, and time tasks +Create and email invoices, track payments and expenses -**Shipped version:** 4.5.45~ynh1 +**Shipped version:** 4.5.47~ynh1 **Demo:** https://app.invoiceninja.com/dashboard diff --git a/README_fr.md b/README_fr.md index f652204..c53d391 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,9 +11,9 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble +Créez et envoyez des factures par e-mail, suivez les paiements - -**Version incluse :** 4.5.45~ynh1 +**Version incluse :** 4.5.47~ynh1 **Démo :** https://app.invoiceninja.com/dashboard From 16cf34faf791557a3c4b38cea314956522573771 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 31 Dec 2021 01:33:39 +0100 Subject: [PATCH 5/8] Apparently there's no more --force option in 'artisan optimize' ? --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index cf3ba06..5d12436 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,7 +150,7 @@ pushd "$final_path" php$phpversion artisan down # Optimize the framework for better performance - php$phpversion artisan optimize --force + php$phpversion artisan optimize # Run the database migrations php$phpversion artisan migrate --force From 4b992cd74221fb718d436f2748548400909a40a0 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Jul 2022 18:04:48 +0200 Subject: [PATCH 6/8] Fix upgrade --- check_process | 7 +++---- scripts/upgrade | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/check_process b/check_process index 0ff4a7c..e6e9e32 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,9 @@ setup_public=0 upgrade=1 # 4.5.18~ynh1 - #upgrade=1 from_commit=572f98be58975399c5e7fc7d435a4ac5b78765da + upgrade=1 from_commit=572f98be58975399c5e7fc7d435a4ac5b78765da + # 4.5.45~ynh1 + upgrade=1 from_commit=1f60ce6460175f08de8e61d7545a3e16888bd904 backup_restore=1 multi_instance=1 port_already_use=0 @@ -21,6 +23,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=572f98be58975399c5e7fc7d435a4ac5b78765da - name=4.5.18~ynh1 diff --git a/scripts/upgrade b/scripts/upgrade index 5d12436..5e62701 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,7 +93,7 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep=".env" fi chmod 750 "$final_path" @@ -154,7 +154,7 @@ pushd "$final_path" # Run the database migrations php$phpversion artisan migrate --force - php$phpversion artisan db:seed --class=UpdateSeeder --force + php$phpversion artisan db:seed --force # Bring the application out of maintenance mode php$phpversion artisan up From 848e3a71301384143d76e53a8ea4df7036bc2b4e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 16 Jul 2022 16:04:53 +0000 Subject: [PATCH 7/8] Auto-update README --- README.md | 19 ++++++++++--------- README_fr.md | 25 +++++++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index af02529..fce5e1d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # InvoiceNinja for YunoHost -[![Integration level](https://dash.yunohost.org/integration/invoiceninja.svg)](https://dash.yunohost.org/appci/app/invoiceninja) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/invoiceninja.svg)](https://dash.yunohost.org/appci/app/invoiceninja) ![Working status](https://ci-apps.yunohost.org/ci/badges/invoiceninja.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/invoiceninja.maintain.svg) [![Install InvoiceNinja with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=invoiceninja) *[Lire ce readme en français.](./README_fr.md)* @@ -23,7 +23,7 @@ Create and email invoices, track payments and expenses ## Screenshots -![](./doc/screenshots/screenshot.png) +![Screenshot of InvoiceNinja](./doc/screenshots/screenshot.png) ## Disclaimers / important information @@ -39,21 +39,22 @@ Create and email invoices, track payments and expenses ## Documentation and resources -* Official app website: https://invoiceninja.org -* Official admin documentation: https://docs.invoiceninja.com/index.html -* Upstream app code repository: https://github.com/invoiceninja/invoiceninja -* YunoHost documentation for this app: https://yunohost.org/app_invoiceninja -* Report a bug: https://github.com/YunoHost-Apps/invoiceninja_ynh/issues +* Official app website: +* 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/invoiceninja_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/invoiceninja_ynh/tree/testing --debug or sudo yunohost app upgrade invoiceninja -u https://github.com/YunoHost-Apps/invoiceninja_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 c53d391..3966277 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # InvoiceNinja pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/invoiceninja.svg)](https://dash.yunohost.org/appci/app/invoiceninja) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/invoiceninja.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/invoiceninja.svg)](https://dash.yunohost.org/appci/app/invoiceninja) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/invoiceninja.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/invoiceninja.maintain.svg) [![Installer InvoiceNinja avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=invoiceninja) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer InvoiceNinja 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.* @@ -19,7 +23,7 @@ Créez et envoyez des factures par e-mail, suivez les paiements ## Captures d'écran -![](./doc/screenshots/screenshot.png) +![Capture d'écran de InvoiceNinja](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -35,21 +39,22 @@ Créez et envoyez des factures par e-mail, suivez les paiements ## Documentations et ressources -* Site officiel de l'app : https://invoiceninja.org -* Documentation officielle de l'admin : https://docs.invoiceninja.com/index.html -* Dépôt de code officiel de l'app : https://github.com/invoiceninja/invoiceninja -* Documentation YunoHost pour cette app : https://yunohost.org/app_invoiceninja -* Signaler un bug : https://github.com/YunoHost-Apps/invoiceninja_ynh/issues +* Site officiel de l'app : +* 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/invoiceninja_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/invoiceninja_ynh/tree/testing --debug ou sudo yunohost app upgrade invoiceninja -u https://github.com/YunoHost-Apps/invoiceninja_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 b4576f05f09dc4e08310443282097ce7bb4308cf Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 17 Jul 2022 01:16:18 +0200 Subject: [PATCH 8/8] Update check_process --- check_process | 2 -- 1 file changed, 2 deletions(-) diff --git a/check_process b/check_process index e6e9e32..98cae9d 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,6 @@ setup_private=0 setup_public=0 upgrade=1 - # 4.5.18~ynh1 - upgrade=1 from_commit=572f98be58975399c5e7fc7d435a4ac5b78765da # 4.5.45~ynh1 upgrade=1 from_commit=1f60ce6460175f08de8e61d7545a3e16888bd904 backup_restore=1