diff --git a/README.md b/README.md index 6f50f84..8da5bb7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Invoice Ninja is the the leading self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. -**Shipped version:** 5.7.57~ynh1 +**Shipped version:** 5.7.62~ynh1 **Demo:** https://react.invoicing.co/demo diff --git a/README_fr.md b/README_fr.md index 3fd651c..f65423f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Invoice Ninja is the the leading self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. -**Version incluse :** 5.7.57~ynh1 +**Version incluse :** 5.7.62~ynh1 **Démo :** https://react.invoicing.co/demo diff --git a/conf/default.env b/conf/default.env index c2115e9..e03cada 100644 --- a/conf/default.env +++ b/conf/default.env @@ -26,7 +26,7 @@ MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS='__EMAIL__' -MAIL_FROM_NAME="__EMAIL_FIRSTNAME__ __EMAIL_LASTNAME__" +MAIL_FROM_NAME='__EMAIL_FULLNAME__' DEMO_MODE=false diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 46caabd..fa4a2d9 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,6 +1,6 @@ Please open your __APP__ domain: https://__DOMAIN____PATH_URL__ -The username is: __EMAIL__ +The username is the administrator's email address The password is the administrator one you filled during the installation The secret is: __API_SECRET__ diff --git a/manifest.toml b/manifest.toml index b45ffab..60db224 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "InvoiceNinja 5" description.en = "Create and email invoices, track payments, expenses, and time tasks" description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" -version = "5.7.57~ynh1" +version = "5.7.62~ynh1" maintainers = ["Sebastian Gumprich"] @@ -58,8 +58,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.7.57/invoiceninja.zip" - sha256 = "b3340715e7a56cf10f0e20c03fb63f213f52963d756e7c1feb634222426af3de" + url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.7.62/invoiceninja.zip" + sha256 = "297284540f4e287411143d72d545635dfab5e6886db354197d544b4624ef5bd7" in_subdir = false autoupdate.strategy = "latest_github_release" autoupdate.asset = "invoiceninja.zip" diff --git a/scripts/install b/scripts/install index fd9eba3..4d1a9b5 100755 --- a/scripts/install +++ b/scripts/install @@ -10,27 +10,24 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST +# GENERATE KEYS AND RETRIEVE ADMIN USER INFO #================================================= api_secret="$(ynh_string_random --length=32)" app_key="$(ynh_string_random --length=32)" phantomjs_key="$(ynh_string_random --length=32)" -email_firstname="$(ynh_user_get_info --username=$admin --key=firstname)" -email_lastname="$(ynh_user_get_info --username=$admin --key=lastname)" + +email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)" email="$(ynh_user_get_info --username=$admin --key=mail)" #================================================= -# STORE SETTINGS FROM MANIFEST +# STORE KEYS TO APP SETTINGS #================================================= -ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing secrets to app settings..." ynh_app_setting_set --app=$app --key=api_secret --value=$api_secret ynh_app_setting_set --app=$app --key=app_key --value=$app_key ynh_app_setting_set --app=$app --key=phantomjs_key --value=$phantomjs_key -ynh_app_setting_set --app=$app --key=email_firstname --value="$email_firstname" -ynh_app_setting_set --app=$app --key=email_lastname --value="$email_lastname" -ynh_app_setting_set --app=$app --key=email --value=$email #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/upgrade b/scripts/upgrade index 91c535f..146c8e0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,6 +45,20 @@ ynh_add_config --template="cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" +#================================================= +# ENSURE BACKWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring backward compatibility..." --weight=1 + +# Delete deprecated `firstname`/`lastname` settings. See upstream https://github.com/YunoHost/yunohost/pull/1516 +ynh_app_setting_delete --app=$app --key=email_firstname +ynh_app_setting_delete --app=$app --key=email_lastname +ynh_app_setting_delete --app=$app --key=email # also delete unnecessary duplicate of state storage + +# Retrieve `$admin` user settings +email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)" +email="$(ynh_user_get_info --username=$admin --key=mail)" + #================================================= # UPDATE A CONFIG FILE #=================================================