invoiceplane: 1.7.1 -> 1.7.2 (#557374)

This commit is contained in:
dish
2026-09-12 02:28:12 +00:00
committed by GitHub
2 changed files with 17 additions and 5 deletions

View File

@@ -332,6 +332,18 @@ in
assertion = cfg.cron.enable -> cfg.cron.key != null;
message = ''services.invoiceplane.sites."${hostName}".cron.key must be set in order to use cron service.'';
}
{
assertion =
(lib.versionAtLeast (pkg hostName cfg).version "1.7.2" && cfg.invoiceTemplates != [ ])
-> cfg.settings ? CUSTOM_INVOICE_TEMPLATES_PDF;
message = ''services.invoiceplane.sites."${hostName}".invoiceTemplates is set but settings.CUSTOM_INVOICE_TEMPLATES_PDF is not. Since InvoicePlane >= 1.7.2 (current: ${cfg.package.version}), the filename of the custom invoice template PHP file must be explicitly whitelisted via settings.CUSTOM_INVOICE_TEMPLATES_PDF, otherwise it will not be picked up.'';
}
{
assertion =
(lib.versionAtLeast (pkg hostName cfg).version "1.7.2" && cfg.quoteTemplates != [ ])
-> cfg.settings ? CUSTOM_QUOTE_TEMPLATES_PDF;
message = ''services.invoiceplane.sites."${hostName}".quoteTemplates is set but settings.CUSTOM_QUOTE_TEMPLATES_PDF is not. Since InvoicePlane >= 1.7.2 (current: ${cfg.package.version}), the filename of the custom quote template PHP file must be explicitly whitelisted via settings.CUSTOM_QUOTE_TEMPLATES_PDF, otherwise it will not be picked up.'';
}
]) eachSite
);

View File

@@ -11,7 +11,7 @@
fetchzip,
}:
let
version = "1.7.1";
version = "1.7.2";
# Fetch release tarball which contains language files
# https://github.com/InvoicePlane/InvoicePlane/issues/1170
languages = fetchzip {
@@ -27,13 +27,13 @@ php.buildComposerProject2 (finalAttrs: {
owner = "InvoicePlane";
repo = "InvoicePlane";
tag = "v${version}";
hash = "sha256-Nci5GaCMYIjewq0W5emE6TDgc6JPz4bVVF3okNtHUag=";
hash = "sha256-LC/c1wdVNguv8BrrY7ysVwomgG8uTPoY1Fw8/EPFk2I=";
};
# Composer.lock validation currently fails for unknown reason
composerStrictValidation = true;
vendorHash = "sha256-adKvKWo55SSbEKpgMJzR9vJQA8DnNXOTfSzp7t8s2Nk=";
vendorHash = "sha256-BRNglvJMREFD9iHPqXycw1WYlxuV9fL8/Zoba2Z3p8w=";
nativeBuildInputs = [
yarnConfigHook
@@ -45,7 +45,7 @@ php.buildComposerProject2 (finalAttrs: {
offlineCache = fetchYarnDeps {
inherit (finalAttrs) src patches;
hash = "sha256-rJlOYMnzFKui+caIFD4d82Q/RcDYnadeJ1G56fcNNQY=";
hash = "sha256-faEq9sVsE5xcqL07IIEmXcavcWPZicb7asmuhuBI+h4=";
};
postBuild = ''
@@ -57,7 +57,7 @@ php.buildComposerProject2 (finalAttrs: {
chmod -R u+w $out/share
mv $out/share/php/invoiceplane/* $out/
cp -r ${languages}/application/language $out/application/
rm -r $out/{composer.json,composer.lock,CONTRIBUTING.md,docker-compose.yml,Gruntfile.js,package.json,node_modules,yarn.lock,share}
rm -r $out/{composer.json,composer.lock,docker-compose.yml,Gruntfile.js,package.json,node_modules,yarn.lock,share}
'';
passthru.tests = {