Merge branch 'master' into dc/workers
This commit is contained in:
commit
2858ce506a
|
@ -41,8 +41,7 @@ class BuildFactory
|
||||||
*/
|
*/
|
||||||
public static function getBuild(Build $base)
|
public static function getBuild(Build $base)
|
||||||
{
|
{
|
||||||
switch($base->getProject()->getType())
|
switch ($base->getProject()->getType()) {
|
||||||
{
|
|
||||||
case 'remote':
|
case 'remote':
|
||||||
$type = 'RemoteGitBuild';
|
$type = 'RemoteGitBuild';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -71,7 +71,7 @@ class MailerFactory
|
||||||
} else {
|
} else {
|
||||||
// Check defaults
|
// Check defaults
|
||||||
|
|
||||||
switch($configName) {
|
switch ($configName) {
|
||||||
case 'smtp_address':
|
case 'smtp_address':
|
||||||
return "localhost";
|
return "localhost";
|
||||||
case 'default_mailto_address':
|
case 'default_mailto_address':
|
||||||
|
|
|
@ -54,8 +54,7 @@ class GithubBuild extends RemoteGitBuild
|
||||||
$url = 'https://api.github.com/repos/'.$project->getReference().'/statuses/'.$this->getCommitId();
|
$url = 'https://api.github.com/repos/'.$project->getReference().'/statuses/'.$this->getCommitId();
|
||||||
$http = new \b8\HttpClient();
|
$http = new \b8\HttpClient();
|
||||||
|
|
||||||
switch($this->getStatus())
|
switch ($this->getStatus()) {
|
||||||
{
|
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
$status = 'pending';
|
$status = 'pending';
|
||||||
|
|
|
@ -69,8 +69,7 @@ class PackageBuild implements \PHPCI\Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->format as $format) {
|
foreach ($this->format as $format) {
|
||||||
switch($format)
|
switch ($format) {
|
||||||
{
|
|
||||||
case 'tar':
|
case 'tar':
|
||||||
$cmd = 'tar cfz "%s/%s.tar.gz" ./*';
|
$cmd = 'tar cfz "%s/%s.tar.gz" ./*';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Factory
|
||||||
*/
|
*/
|
||||||
public static function createProcessControl()
|
public static function createProcessControl()
|
||||||
{
|
{
|
||||||
switch(true) {
|
switch (true) {
|
||||||
case PosixProcessControl::isAvailable():
|
case PosixProcessControl::isAvailable():
|
||||||
return new PosixProcessControl();
|
return new PosixProcessControl();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue