compile 467 B

12345678910111213141516171819202122
  1. #!/usr/bin/env php
  2. <?php
  3. $cwd = getcwd();
  4. chdir(__DIR__.'/../');
  5. shell_exec('php bin/composer install -q');
  6. chdir($cwd);
  7. require __DIR__.'/../src/bootstrap.php';
  8. use Composer\Compiler;
  9. error_reporting(-1);
  10. ini_set('display_errors', 1);
  11. try {
  12. $compiler = new Compiler();
  13. $compiler->compile();
  14. } catch (\Exception $e) {
  15. echo 'Failed to compile phar: ['.get_class($e).'] '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().PHP_EOL;
  16. exit(1);
  17. }