From 3345680f7d7e2a7b199d2a2fd607c769f4c2a672 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 24 Mar 2024 11:58:31 +0000 Subject: [PATCH] Licensing: Added license gen as composer command --- composer.json | 4 ++++ dev/licensing/gen-js-licenses | 2 +- dev/licensing/gen-php-licenses | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 79246b7ac..b22c7b44d 100644 --- a/composer.json +++ b/composer.json @@ -72,6 +72,10 @@ "lint": "phpcs", "test": "phpunit", "t-reset": "@php artisan test --recreate-databases", + "build-licenses": [ + "@php ./dev/licensing/gen-js-licenses", + "@php ./dev/licensing/gen-php-licenses" + ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" diff --git a/dev/licensing/gen-js-licenses b/dev/licensing/gen-js-licenses index dfb2f6651..191a16f30 100644 --- a/dev/licensing/gen-js-licenses +++ b/dev/licensing/gen-js-licenses @@ -22,7 +22,7 @@ $licenseInfo = implode($outputSeparator, $packageOutput) . "\n"; file_put_contents($outputPath, $licenseInfo); echo "License information written to {$outputPath}\n"; -echo implode("\n", getWarnings()); +echo implode("\n", getWarnings()) . "\n"; function packageToOutput(string $packagePath): string { diff --git a/dev/licensing/gen-php-licenses b/dev/licensing/gen-php-licenses index ed5a21c5a..79f4c2ff6 100644 --- a/dev/licensing/gen-php-licenses +++ b/dev/licensing/gen-php-licenses @@ -19,7 +19,7 @@ $licenseInfo = implode($outputSeparator, $packageOutput) . "\n"; file_put_contents($outputPath, $licenseInfo); echo "License information written to {$outputPath}\n"; -echo implode("\n", getWarnings()); +echo implode("\n", getWarnings()) . "\n"; function packageToOutput(stdClass $package) : string { global $rootPath;