Updating PHPCI to use Composer-installed copies of the plugin requirements
This commit is contained in:
parent
2cd60e0524
commit
14f40e9b0f
|
@ -17,6 +17,6 @@ class Composer implements \PHPCI\Plugin
|
||||||
|
|
||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
return $this->phpci->executeCommand('composer --working-dir=' . $this->directory . ' ' . $this->action);
|
return $this->phpci->executeCommand(PHPCI_DIR . 'composer.phar --working-dir=' . $this->directory . ' ' . $this->action);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,9 +17,11 @@ class Mysql implements \PHPCI\Plugin
|
||||||
{
|
{
|
||||||
$rtn = true;
|
$rtn = true;
|
||||||
|
|
||||||
|
$db = \b8\Database::getConnection('write')->getDetails();
|
||||||
|
|
||||||
foreach($this->queries as $query)
|
foreach($this->queries as $query)
|
||||||
{
|
{
|
||||||
$rtn = !$this->phpci->executeCommand('mysql -uroot -e "'.$query.'"') ? false : $rtn;
|
$rtn = !$this->phpci->executeCommand('mysql -h'.PHPCI_DB_HOST.' -u'.$db['user'].(!empty($db['pass']) ? ' -p' . $db['pass'] : '').' -e "'.$query.'"') ? false : $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rtn;
|
return $rtn;
|
||||||
|
|
|
@ -27,6 +27,6 @@ class PhpCodeSniffer implements \PHPCI\Plugin
|
||||||
$ignore = ' --ignore=' . implode(',', $ignore);
|
$ignore = ' --ignore=' . implode(',', $ignore);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->phpci->executeCommand('phpcs --standard=' . $this->standard . $ignore. ' ' . $this->phpci->buildPath);
|
return $this->phpci->executeCommand(PHPCI_BIN_DIR . 'phpcs --standard=' . $this->standard . $ignore. ' ' . $this->phpci->buildPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,6 +27,6 @@ class PhpCpd implements \PHPCI\Plugin
|
||||||
$ignore = ' ' . implode('', $ignore);
|
$ignore = ' ' . implode('', $ignore);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->phpci->executeCommand('phpcpd ' . $ignore . ' ' . $this->phpci->buildPath);
|
return $this->phpci->executeCommand(PHPCI_BIN_DIR . 'phpcpd ' . $ignore . ' ' . $this->phpci->buildPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,6 +23,6 @@ class PhpMessDetector implements \PHPCI\Plugin
|
||||||
$ignore = ' --exclude ' . implode(',', $ignore);
|
$ignore = ' --exclude ' . implode(',', $ignore);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->phpci->executeCommand('phpmd ' . $this->phpci->buildPath . ' text codesize,unusedcode,naming' . $ignore);
|
return $this->phpci->executeCommand(PHPCI_BIN_DIR . 'phpmd ' . $this->phpci->buildPath . ' text codesize,unusedcode,naming' . $ignore);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,6 +17,6 @@ class PhpUnit implements \PHPCI\Plugin
|
||||||
|
|
||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
return $this->phpci->executeCommand('phpunit ' . $this->args . ' ' . $this->phpci->buildPath . $this->directory);
|
return $this->phpci->executeCommand(PHPCI_BIN_DIR . 'phpunit ' . $this->args . ' ' . $this->phpci->buildPath . $this->directory);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "block8/phpci",
|
"name": "block8/phpci",
|
||||||
"description": "Simple continuous integration for PHP projects.",
|
"description": "Simple continuous integration for PHP projects.",
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -10,6 +11,11 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
"require": {
|
"require": {
|
||||||
"block8/b8framework": "dev-master"
|
"block8/b8framework": "dev-master",
|
||||||
|
"phpunit/phpunit": "3.*",
|
||||||
|
"phpmd/phpmd" : "1.*",
|
||||||
|
"sebastian/phpcpd": "1.*",
|
||||||
|
"squizlabs/php_codesniffer": "1.*",
|
||||||
|
"ext-yaml": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
3
cron.php
3
cron.php
|
@ -5,6 +5,9 @@ ini_set('display_errors', 'on');
|
||||||
|
|
||||||
require_once('bootstrap.php');
|
require_once('bootstrap.php');
|
||||||
|
|
||||||
|
define('PHPCI_BIN_DIR', dirname(__FILE__) . '/vendor/bin/');
|
||||||
|
define('PHPCI_DIR', dirname(__FILE__) . '/');
|
||||||
|
|
||||||
$store = b8\Store\Factory::getStore('Build');
|
$store = b8\Store\Factory::getStore('Build');
|
||||||
$result = $store->getByStatus(0);
|
$result = $store->getByStatus(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue