phpci/console

38 lines
1.2 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env php
<?php
2013-05-16 03:16:56 +02:00
/**
* 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/
2013-05-16 03:16:56 +02:00
*/
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.
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 );
}
require('bootstrap.php');
use PHPCI\Command\RunCommand;
use PHPCI\Command\GenerateCommand;
2013-10-08 08:45:20 +02:00
use PHPCI\Command\UpdateCommand;
use PHPCI\Command\InstallCommand;
2013-06-09 18:42:50 +02:00
use PHPCI\Command\DaemonCommand;
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);
$application->add(new GenerateCommand);
2013-06-09 18:42:50 +02:00
$application->add(new DaemonCommand);
$application->run();