Licensing: Added license gen as composer command

This commit is contained in:
Dan Brown 2024-03-24 11:58:31 +00:00
parent a2fd80954b
commit 3345680f7d
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
3 changed files with 6 additions and 2 deletions

View File

@ -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"

View File

@ -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
{

View File

@ -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;