1
0
Fork 0

Make autoloader suffix a reproducible value as well, refs #3927

pull/3991/head
Jordi Boggiano 2015-05-01 14:32:32 +01:00
parent 164dc2a097
commit 2a48b0faa0
2 changed files with 8 additions and 1 deletions

View File

@ -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';

View File

@ -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);