Skip to content

Commit 804832e

Browse files
committed
Enable compression in build script to fix issue with unpacking
1 parent a8ac932 commit 804832e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bin/build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ shell_exec('cd ' . BUILD_DIR . ' && composer install --no-dev --optimize-autoloa
5252
$buildVendorDir = BUILD_DIR . '/vendor';
5353
add_directory_to_phar($buildVendorDir, $phar, 'vendor');
5454
// Done with composer
55-
55+
$minPhpVersion = trim($phar['PHP_VERSION']->getContent());
56+
$phar->compressFiles(Phar::GZ);
5657
$phar->stopBuffering();
5758
// TODO: We can use phar as a binary with proper length deduction
5859
// system('sed -i "1i #!/usr/bin/env manticore-executor" ' . $pharFile); // +36
@@ -61,8 +62,6 @@ $phar->stopBuffering();
6162
$pharContent = file_get_contents($pharFile);
6263
$pharContent = str_replace("chdir(\$origdir);\n", '', $pharContent);
6364
$pharContent = str_replace('LEN = 6646', 'LEN = 6629', $pharContent);
64-
// TODO: we should add gz to manticore-executor or do not use it
65-
// $phar->compressFiles(Phar::GZ);
6665

6766
// Now update signature
6867
// $oldSignature = substr($pharContent, -40, -8);
@@ -72,7 +71,6 @@ $newSignature = hash('sha256', $pharData, true) . $signatureSuffix;
7271
$pharContent = $pharData . $newSignature;
7372
file_put_contents($pharFile, $pharContent);
7473

75-
$minPhpVersion = trim($phar['PHP_VERSION']->getContent());
7674
// Rewrite the resulting file to support dynamic executor
7775
$bash = implode(PHP_EOL, [
7876
'#!/usr/bin/env bash',

0 commit comments

Comments
 (0)