diff --git a/bin/compile b/bin/compile index ce98de81c..a2720a95d 100755 --- a/bin/compile +++ b/bin/compile @@ -3,9 +3,16 @@ $cwd = getcwd(); chdir(__DIR__.'/../'); +$ts = rtrim(shell_exec('git log -n1 --pretty=%ct HEAD')); +if (!is_numeric($ts)) { + echo 'Could not detect date using "git log -n1 --pretty=%ct HEAD"'.PHP_EOL; + exit(1); +} // Install with the current version to force it having the right ClassLoader version // Install without dev packages to clean up the included classmap from phpunit classes +shell_exec('php bin/composer config autoloader-suffix ComposerPhar' . $ts); shell_exec('php bin/composer install -q --no-dev'); +shell_exec('php bin/composer config autoloader-suffix --unset'); chdir($cwd); require __DIR__.'/../src/bootstrap.php'; diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php index 77b48825e..b3e4abcdc 100644 --- a/src/Composer/Compiler.php +++ b/src/Composer/Compiler.php @@ -145,7 +145,7 @@ class Compiler unset($phar); - // resign the phar with reproducible timestamp / signature + // re-sign the phar with reproducible timestamp / signature $util = new Timestamps($pharFile); $util->updateTimestamps($this->versionDate); $util->save($pharFile, \Phar::SHA1);