Skip to content

Commit

Permalink
Licensing: Added license gen as composer command
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Mar 24, 2024
1 parent a2fd809 commit 3345680
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dev/licensing/gen-js-licenses
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion dev/licensing/gen-php-licenses
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3345680

Please sign in to comment.