Merge pull request #506 from YunoHost-Apps/testing

Testing
This commit is contained in:
CodeShakingSheep
2026-03-30 11:06:42 -05:00
committed by GitHub
8 changed files with 57 additions and 13 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ Create and email invoices, track payments, expenses, and time tasks
[![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://invoiceninja.org) [![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://invoiceninja.org)
[![App Demo](https://img.shields.io/badge/App_Demo-blue?style=for-the-badge)](https://react.invoicing.co/demo) [![App Demo](https://img.shields.io/badge/App_Demo-blue?style=for-the-badge)](https://react.invoicing.co/demo)
[![Version: 5.12.69~ynh1](https://img.shields.io/badge/Version-5.12.69~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/invoiceninja5/) [![Version: 5.12.70~ynh1](https://img.shields.io/badge/Version-5.12.70~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/invoiceninja5/)
<div align="center"> <div align="center">
<a href="https://apps.yunohost.org/app/invoiceninja5"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a> <a href="https://apps.yunohost.org/app/invoiceninja5"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
+2 -2
View File
@@ -25,8 +25,8 @@ MAIL_PORT=25
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS='__EMAIL__' MAIL_FROM_ADDRESS='__DEFAULT_FROM_EMAIL_ADDRESS__'
MAIL_FROM_NAME='__EMAIL_FULLNAME__' MAIL_FROM_NAME='__DEFAULT_FROM_EMAIL_NAME__'
DEMO_MODE=false DEMO_MODE=false
+18
View File
@@ -0,0 +1,18 @@
version = "1.0"
[main]
name = "InvoicNinja configuration"
[main.config]
name = "Configuration Options"
[main.config.default_from_email_address]
ask.en = "Choose from which mail address emails will be sent"
ask.fr = "Choisissez à partir de quelle adresse e-mail les e-mails seront envoyés"
help = "Default email address to use for various automated emails."
bind = "MAIL_FROM_ADDRESS:__INSTALL_DIR__/.env"
[main.config.default_from_email_name]
ask.en = "Choose what name will be displayed when InvoiceNinja sends mails"
ask.fr = "Choisissez quel nom sera affiché lorsque InvoiceNinja enverra des e-mails"
help = "Default name address to use for various automated names."
bind = "MAIL_FROM_NAME:__INSTALL_DIR__/.env"
+3 -5
View File
@@ -7,7 +7,7 @@ name = "InvoiceNinja 5"
description.en = "Create and email invoices, track payments, expenses, and time tasks" 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" description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires"
version = "5.12.69~ynh1" version = "5.12.70~ynh1"
maintainers = ["Sebastian Gumprich"] maintainers = ["Sebastian Gumprich"]
@@ -51,8 +51,6 @@ ram.runtime = "50M"
type = "user" type = "user"
[install.password] [install.password]
help.en = "Use the help field to add an information for the admin about this question."
help.fr = "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
type = "password" type = "password"
[resources] [resources]
@@ -60,8 +58,8 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.12.69/invoiceninja.tar" url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.12.70/invoiceninja.tar"
sha256 = "ca97b853c9c2a2ff1c82fa374a48f23245077cdef911e2748a1543cac5f50139" sha256 = "b631ba3651873f0635131e4c518eff5f0cc803ecfd28bcf3ab012db5be3181fc"
format = "tar.gz" format = "tar.gz"
in_subdir = false in_subdir = false
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_release"
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
source /usr/share/yunohost/helpers
# Cache needs to be cleared after updating vars through config panel
ynh_app_config_apply() {
_ynh_app_config_apply
pushd "$install_dir"
# Optimize the framework for better performance
php$phpversion artisan optimize --no-interaction --verbose
popd
}
ynh_app_config_run $1
+5 -3
View File
@@ -14,12 +14,14 @@ api_secret="$(ynh_string_random --length=32)"
app_key="$(ynh_string_random --length=32)" app_key="$(ynh_string_random --length=32)"
phantomjs_key="$(ynh_string_random --length=32)" phantomjs_key="$(ynh_string_random --length=32)"
email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)" default_from_email_name="$(ynh_user_get_info --username=$admin --key=fullname)"
email="$(ynh_user_get_info --username=$admin --key=mail)" default_from_email_address="$(ynh_user_get_info --username=$admin --key=mail)"
ynh_app_setting_set --key=api_secret --value=$api_secret ynh_app_setting_set --key=api_secret --value=$api_secret
ynh_app_setting_set --key=app_key --value=$app_key ynh_app_setting_set --key=app_key --value=$app_key
ynh_app_setting_set --key=phantomjs_key --value=$phantomjs_key ynh_app_setting_set --key=phantomjs_key --value=$phantomjs_key
ynh_app_setting_set --key=default_from_email_address --value="$default_from_email_address"
ynh_app_setting_set --key=default_from_email_name --value="$default_from_email_name"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@@ -55,7 +57,7 @@ ynh_script_progression "Building the application..."
pushd "$install_dir" pushd "$install_dir"
# Run the database migrations and initially fill the db # Run the database migrations and initially fill the db
php$php_version artisan migrate:fresh --seed --no-interaction --verbose --force php$php_version artisan migrate:fresh --seed --no-interaction --verbose --force
php$php_version artisan ninja:create-account --email $email --password "$password" --no-interaction --verbose php$php_version artisan ninja:create-account --email $default_from_email_address --password "$password" --no-interaction --verbose
php$php_version artisan optimize --no-interaction --verbose php$php_version artisan optimize --no-interaction --verbose
php$php_version artisan view:clear php$php_version artisan view:clear
php$php_version artisan cache:clear php$php_version artisan cache:clear
+11 -2
View File
@@ -17,8 +17,17 @@ ynh_app_setting_delete --key=email_lastname
ynh_app_setting_delete --key=email # also delete unnecessary duplicate of state storage ynh_app_setting_delete --key=email # also delete unnecessary duplicate of state storage
# Retrieve `$admin` user settings # Retrieve `$admin` user settings
ynh_app_setting_set_default --key=email_fullname --value="$(ynh_user_get_info --username=$admin --key=fullname)" default_from_email_address=$(ynh_app_setting_get --key=default_from_email_address)
ynh_app_setting_set_default --key=email --value="$(ynh_user_get_info --username=$admin --key=mail)" if [ -z "$default_from_email_address" ]; then
default_from_email_address="${app}@${domain}"
ynh_app_setting_set --key=default_from_email_address --value="$default_from_email_address"
fi
default_from_email_name=$(ynh_app_setting_get --key=default_from_email_name)
if [ -z "$default_from_email_name" ]; then
default_from_email_name="${app}@${domain}"
ynh_app_setting_set --key=default_from_email_name --value="$default_from_email_name"
fi
ynh_app_setting_set_default --key=api_secret --value="$(ynh_string_random --length=32)" ynh_app_setting_set_default --key=api_secret --value="$(ynh_string_random --length=32)"
ynh_app_setting_set_default --key=app_key --value="$(ynh_string_random --length=32)" ynh_app_setting_set_default --key=app_key --value="$(ynh_string_random --length=32)"
+3
View File
@@ -12,6 +12,9 @@ test_format = 1.0
# Default args to use for install # Default args to use for install
# ------------------------------- # -------------------------------
args.default_from_email_address = "invoiceninja@example.tld"
args.default_from_email_name = "invoiceninja"
# ------------------------------- # -------------------------------
# Commits to test upgrade from # Commits to test upgrade from
# ------------------------------- # -------------------------------