diff --git a/src/BuildProcess/CompressApplication.php b/src/BuildProcess/CompressApplication.php index 2c7dd4e..a16d04a 100644 --- a/src/BuildProcess/CompressApplication.php +++ b/src/BuildProcess/CompressApplication.php @@ -44,6 +44,8 @@ public function __invoke() $archive->addFile($file->getRealPath(), $relativePathName); + $archive->setCompressionName($relativePathName, ZipArchive::CM_DEFLATE, 9); + $archive->setExternalAttributesName( $relativePathName, ZipArchive::OPSYS_UNIX, @@ -63,7 +65,7 @@ public function __invoke() */ protected function compressApplicationOnMac() { - (new Process(['zip', '-r', $this->buildPath.'/app.zip', '.'], $this->appPath))->mustRun(); + (new Process(['zip', '-r -9', $this->buildPath.'/app.zip', '.'], $this->appPath))->mustRun(); } /** diff --git a/src/BuildProcess/CompressVendor.php b/src/BuildProcess/CompressVendor.php index 816d6b8..9c2ee4e 100644 --- a/src/BuildProcess/CompressVendor.php +++ b/src/BuildProcess/CompressVendor.php @@ -38,6 +38,8 @@ public function __invoke() $archive->addFile($file->getRealPath(), $relativePathName); + $archive->setCompressionName($relativePathName, ZipArchive::CM_DEFLATE, 9); + $archive->setExternalAttributesName( $relativePathName, ZipArchive::OPSYS_UNIX, @@ -55,7 +57,7 @@ public function __invoke() */ protected function compressOnMac() { - (new Process(['zip', '-r', $this->buildPath.'/vendor.zip', '.'], $this->vendorPath))->mustRun(); + (new Process(['zip', '-r -9', $this->buildPath.'/vendor.zip', '.'], $this->vendorPath))->mustRun(); } /**