diff --git a/build/server-phar.php b/build/server-phar.php index 394e0f62c..f173b969d 100644 --- a/build/server-phar.php +++ b/build/server-phar.php @@ -104,14 +104,9 @@ function buildPhar(string $pharPath, string $basePath, array $includedPaths, arr yield "Added $count files"; if($compression !== null){ - yield "Checking for compressible files..."; - foreach($phar as $file => $finfo){ - /** @var \PharFileInfo $finfo */ - if($finfo->getSize() > (1024 * 512)){ - yield "Compressing " . $finfo->getFilename(); - $finfo->compress($compression); - } - } + yield "Compressing files..."; + $phar->compressFiles($compression); + yield "Finished compression"; } $phar->stopBuffering(); @@ -137,7 +132,23 @@ function main() : void{ [ 'git' => $gitHash ], - '