Add phar-utils package to update timestamps after the build is done, refs #3927
parent
ebffb3c179
commit
facdd8a503
|
@ -3,7 +3,9 @@
|
||||||
|
|
||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
chdir(__DIR__.'/../');
|
chdir(__DIR__.'/../');
|
||||||
shell_exec('php bin/composer install -q');
|
// 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 install -q --no-dev');
|
||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
|
|
||||||
require __DIR__.'/../src/bootstrap.php';
|
require __DIR__.'/../src/bootstrap.php';
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
"seld/jsonlint": "~1.0",
|
"seld/jsonlint": "~1.0",
|
||||||
"symfony/console": "~2.5",
|
"symfony/console": "~2.5",
|
||||||
"symfony/finder": "~2.2",
|
"symfony/finder": "~2.2",
|
||||||
"symfony/process": "~2.1"
|
"symfony/process": "~2.1",
|
||||||
|
"seld/phar-utils": "~1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.5",
|
"phpunit/phpunit": "~4.5",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "9a6a4c54f625e54ffe83b995dd796620",
|
"hash": "3b9e15f9521bb0a41897f65f76c1c7de",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "justinrainbow/json-schema",
|
"name": "justinrainbow/json-schema",
|
||||||
|
@ -118,6 +118,50 @@
|
||||||
],
|
],
|
||||||
"time": "2015-01-04 21:18:15"
|
"time": "2015-01-04 21:18:15"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "seld/phar-utils",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Seldaek/phar-utils.git",
|
||||||
|
"reference": "9e36488921bc9252f9712190931966b2fe817e51"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9e36488921bc9252f9712190931966b2fe817e51",
|
||||||
|
"reference": "9e36488921bc9252f9712190931966b2fe817e51",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Seld\\PharUtils\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHAR file format utilities, for when PHP phars you up",
|
||||||
|
"keywords": [
|
||||||
|
"phra"
|
||||||
|
],
|
||||||
|
"time": "2015-05-01 12:39:58"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v2.6.6",
|
"version": "v2.6.6",
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace Composer;
|
||||||
use Composer\Json\JsonFile;
|
use Composer\Json\JsonFile;
|
||||||
use Symfony\Component\Finder\Finder;
|
use Symfony\Component\Finder\Finder;
|
||||||
use Symfony\Component\Process\Process;
|
use Symfony\Component\Process\Process;
|
||||||
|
use Seld\PharUtils\Timestamps;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Compiler class compiles composer into a phar
|
* The Compiler class compiles composer into a phar
|
||||||
|
@ -143,6 +144,11 @@ class Compiler
|
||||||
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../LICENSE'), false);
|
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../LICENSE'), false);
|
||||||
|
|
||||||
unset($phar);
|
unset($phar);
|
||||||
|
|
||||||
|
// resign the phar with reproducible timestamp / signature
|
||||||
|
$util = new Timestamps($pharFile);
|
||||||
|
$util->updateTimestamps($this->versionDate);
|
||||||
|
$util->save($pharFile, \Phar::SHA1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function addFile($phar, $file, $strip = true)
|
private function addFile($phar, $file, $strip = true)
|
||||||
|
|
Loading…
Reference in New Issue