build/make-server: bail when composer dev dependencies are installed

these mess up the phar and make it extremely bloated. Almost everyone building for themselves unintentionally includes dev dependencies.
This commit is contained in:
Dylan K. Taylor 2020-11-16 18:54:07 +00:00
parent 9f3fb935b5
commit 50e29a5ed8

View File

@ -41,6 +41,7 @@ use function rtrim;
use function sprintf;
use function str_replace;
use function unlink;
use const PHP_EOL;
require dirname(__DIR__) . '/vendor/autoload.php';
@ -129,6 +130,10 @@ function main() : void{
echo "Set phar.readonly to 0 with -dphar.readonly=0" . PHP_EOL;
exit(1);
}
if(file_exists(dirname(__DIR__) . '/vendor/phpunit')){
echo "Remove Composer dev dependencies before building (composer install --no-dev)" . PHP_EOL;
exit(1);
}
$opts = getopt("", ["out:", "git:"]);
if(isset($opts["git"])){