Skip to content

Commit 32bbf4a

Browse files
author
Jasper Koers
committed
Enhance compression at CompressVendor by setting compression level to maximum for better efficiency
1 parent 336b1cd commit 32bbf4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/BuildProcess/CompressVendor.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function __invoke()
3838

3939
$archive->addFile($file->getRealPath(), $relativePathName);
4040

41+
$archive->setCompressionName($relativePathName, ZipArchive::CM_DEFLATE, 9);
42+
4143
$archive->setExternalAttributesName(
4244
$relativePathName,
4345
ZipArchive::OPSYS_UNIX,
@@ -55,7 +57,7 @@ public function __invoke()
5557
*/
5658
protected function compressOnMac()
5759
{
58-
(new Process(['zip', '-r', $this->buildPath.'/vendor.zip', '.'], $this->vendorPath))->mustRun();
60+
(new Process(['zip', '-r -9', $this->buildPath.'/vendor.zip', '.'], $this->vendorPath))->mustRun();
5961
}
6062

6163
/**

0 commit comments

Comments
 (0)