diff --git a/README.md b/README.md index d4c3a9e..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)* @@ -15,15 +15,15 @@ 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 ## 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, and time tasks ## 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 f652204..3966277 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,25 +1,29 @@ + + # 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.* ## 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 ## Captures d'écran -![](./doc/screenshots/screenshot.png) +![Capture d'écran de InvoiceNinja](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -35,21 +39,22 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## 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 :** diff --git a/check_process b/check_process index 8de3a05..98cae9d 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ 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 multi_instance=1 port_already_use=0 @@ -21,6 +21,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=572f98be58975399c5e7fc7d435a4ac5b78765da - name=4.5.18~ynh1 diff --git a/conf/.env b/conf/.env index e251111..ebe69c9 100644 --- a/conf/.env +++ b/conf/.env @@ -29,7 +29,7 @@ MAILGUN_SECRET= #POSTMARK_API_TOKEN= -PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address' +PHANTOMJS_BIN_PATH=/usr/bin/phantomjs PHANTOMJS_SECRET=__PHANTOMJS_KEY__ LOG=single 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 d992ea3..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": [ @@ -33,8 +34,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -44,8 +44,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "language", diff --git a/scripts/_common.sh b/scripts/_common.sh index 2e5c821..850ac56 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="" +pkg_dependencies="phantomjs" YNH_PHP_VERSION="7.3" diff --git a/scripts/install b/scripts/install index f25c0be..6c5ab1f 100755 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,13 @@ 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 de8e21c..e15f128 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 old mode 100755 new mode 100644 index 7f41b5c..f39f926 --- 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 @@ -88,7 +85,15 @@ 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 #================================================= -# RESTORE VARIOUS FILES +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# RESTORE THE CRON FILE #================================================= ynh_script_progression --message="Restoring various files..." diff --git a/scripts/upgrade b/scripts/upgrade index 70a2965..5e62701 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,13 +93,20 @@ 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" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -143,11 +150,11 @@ 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 - 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