36 lines
1.1 KiB
PHP
Executable file
36 lines
1.1 KiB
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
/**
|
|
* PHPCI - Continuous Integration for PHP
|
|
*
|
|
* @copyright Copyright 2013, Block 8 Limited.
|
|
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
|
* @link http://www.phptesting.org/
|
|
*/
|
|
|
|
define('PHPCI_BIN_DIR', dirname(__FILE__) . '/vendor/bin/');
|
|
define('PHPCI_DIR', dirname(__FILE__) . '/');
|
|
define('ENABLE_SHELL_PLUGIN', false);
|
|
|
|
// 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.
|
|
if (!file_exists(PHPCI_DIR . 'vendor/autoload.php')) {
|
|
file_put_contents('php://stderr', 'Please install PHPCI with "composer install" before using console');
|
|
exit( 1 );
|
|
}
|
|
|
|
require('bootstrap.php');
|
|
|
|
use PHPCI\Command\RunCommand;
|
|
use PHPCI\Command\GenerateCommand;
|
|
use PHPCI\Command\InstallCommand;
|
|
use PHPCI\Command\DaemonCommand;
|
|
use Symfony\Component\Console\Application;
|
|
|
|
$application = new Application();
|
|
$application->add(new RunCommand);
|
|
$application->add(new InstallCommand);
|
|
$application->add(new GenerateCommand);
|
|
$application->add(new DaemonCommand);
|
|
$application->run();
|