Skip to content

Commit

Permalink
Build all composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mschering committed Jan 13, 2025
1 parent c049523 commit 3c5427b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,16 @@ private function buildFromSource()

putenv("COMPOSER_ALLOW_SUPERUSER=1");


$composerFiles = run("find . composer.json -type f");
cd($this->buildDir . "/" . $this->packageName);
$composerFiles = run("find . -name composer.json -type f -not -path '*/vendor/*'");

foreach ($composerFiles as $composerFile) {

echo $composerFile . "\n";

cd(dirname($composerFile));
run("composer install --no-dev --optimize-autoloader --ignore-platform-reqs");
cd($this->buildDir . "/" . $this->packageName);
}

cd($this->buildDir . "/" . $this->packageName);
Expand All @@ -190,7 +194,6 @@ private function buildFromSource()
run("sass --no-source-map $sassFile " . dirname(dirname($sassFile)) . '/' . str_replace('scss', 'css', basename($sassFile)));
}


// remove sensitive files OWASP WSTG - WSTG-INFO-05
run("rm composer.json composer.lock vendor/composer/installed.json");

Expand Down

0 comments on commit 3c5427b

Please sign in to comment.