php-censor/bin/console
2016-12-30 23:40:14 +07:00

42 lines
1.5 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/
*/
use PHPCensor\Command\RunCommand;
use PHPCensor\Command\RebuildCommand;
use PHPCensor\Command\InstallCommand;
use PHPCensor\Command\DaemonCommand;
use PHPCensor\Command\PollCommand;
use PHPCensor\Command\CreateAdminCommand;
use PHPCensor\Command\CreateBuildCommand;
use PHPCensor\Command\WorkerCommand;
use PHPCensor\Command\RebuildQueueCommand;
use PHPCensor\Service\BuildService;
use b8\Store\Factory;
use PHPCensor\Console\Application;
define('IS_CONSOLE', true);
require_once(dirname(__DIR__) . '/bootstrap.php');
$application = new Application();
$application->add(new RunCommand($loggerConfig->getFor('RunCommand')));
$application->add(new RebuildCommand($loggerConfig->getFor('RunCommand')));
$application->add(new InstallCommand);
$application->add(new DaemonCommand($loggerConfig->getFor('DaemonCommand')));
$application->add(new PollCommand($loggerConfig->getFor('PollCommand')));
$application->add(new CreateAdminCommand(Factory::getStore('User')));
$application->add(new CreateBuildCommand(Factory::getStore('Project'), new BuildService(Factory::getStore('Build'))));
$application->add(new WorkerCommand($loggerConfig->getFor('WorkerCommand')));
$application->add(new RebuildQueueCommand($loggerConfig->getFor('RebuildQueueCommand')));
$application->run();