2013-05-15 19:27:13 +02:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
2013-05-16 03:16:56 +02:00
|
|
|
/**
|
|
|
|
* PHPCI - Continuous Integration for PHP
|
|
|
|
*
|
2013-05-16 03:57:02 +02:00
|
|
|
* @copyright Copyright 2013, Block 8 Limited.
|
|
|
|
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
|
|
|
* @link http://www.phptesting.org/
|
2013-05-16 03:16:56 +02:00
|
|
|
*/
|
2013-05-15 19:27:13 +02:00
|
|
|
|
2013-05-15 23:29:09 +02:00
|
|
|
define('PHPCI_BIN_DIR', dirname(__FILE__) . '/vendor/bin/');
|
|
|
|
define('PHPCI_DIR', dirname(__FILE__) . '/');
|
2013-06-09 21:11:22 +02:00
|
|
|
define('ENABLE_SHELL_PLUGIN', false);
|
2013-05-15 23:29:09 +02:00
|
|
|
|
|
|
|
// If this is the first time ./console has been run, we probably don't have Composer or any of our dependencies yet.
|
|
|
|
// So we need to install and run Composer.
|
2013-07-31 08:08:19 +02:00
|
|
|
if (!file_exists(PHPCI_DIR . 'vendor/autoload.php')) {
|
|
|
|
file_put_contents('php://stderr', 'Please install PHPCI with "composer install" before using console');
|
|
|
|
exit( 1 );
|
2013-05-16 03:57:02 +02:00
|
|
|
}
|
2013-05-15 23:29:09 +02:00
|
|
|
|
2013-05-16 03:57:02 +02:00
|
|
|
require('bootstrap.php');
|
2013-05-15 23:29:09 +02:00
|
|
|
|
2013-05-15 19:27:13 +02:00
|
|
|
use PHPCI\Command\RunCommand;
|
|
|
|
use PHPCI\Command\GenerateCommand;
|
2013-10-08 08:45:20 +02:00
|
|
|
use PHPCI\Command\UpdateCommand;
|
2013-05-15 19:27:13 +02:00
|
|
|
use PHPCI\Command\InstallCommand;
|
2013-06-09 18:42:50 +02:00
|
|
|
use PHPCI\Command\DaemonCommand;
|
2013-05-15 19:27:13 +02:00
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
|
|
|
|
$application = new Application();
|
|
|
|
$application->add(new RunCommand);
|
|
|
|
$application->add(new InstallCommand);
|
2013-10-08 08:45:20 +02:00
|
|
|
$application->add(new UpdateCommand);
|
2013-05-15 19:27:13 +02:00
|
|
|
$application->add(new GenerateCommand);
|
2013-06-09 18:42:50 +02:00
|
|
|
$application->add(new DaemonCommand);
|
2013-05-15 19:27:13 +02:00
|
|
|
$application->run();
|