2011-09-05 08:18:32 +00:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2015-05-01 10:21:21 +00:00
|
|
|
$cwd = getcwd();
|
|
|
|
chdir(__DIR__.'/../');
|
2015-05-01 12:44:24 +00:00
|
|
|
// 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');
|
2015-05-01 10:21:21 +00:00
|
|
|
chdir($cwd);
|
|
|
|
|
2012-03-15 12:14:02 +00:00
|
|
|
require __DIR__.'/../src/bootstrap.php';
|
2011-09-05 08:18:32 +00:00
|
|
|
|
|
|
|
use Composer\Compiler;
|
|
|
|
|
2012-05-12 07:41:15 +00:00
|
|
|
error_reporting(-1);
|
|
|
|
ini_set('display_errors', 1);
|
2012-05-11 14:41:41 +00:00
|
|
|
|
2013-03-10 12:58:49 +00:00
|
|
|
try {
|
|
|
|
$compiler = new Compiler();
|
|
|
|
$compiler->compile();
|
|
|
|
} catch (\Exception $e) {
|
2015-05-01 10:21:21 +00:00
|
|
|
echo 'Failed to compile phar: ['.get_class($e).'] '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().PHP_EOL;
|
2013-03-10 12:58:49 +00:00
|
|
|
exit(1);
|
|
|
|
}
|