Refactoring builds out into separate model types (Github, Bitbucket, Local) and builder to use build->createWorkingCopy() to make build directory. Fixes #29

This commit is contained in:
Dan Cryer 2013-05-15 23:47:37 +01:00
commit be37a5e821
9 changed files with 304 additions and 150 deletions

View file

@ -16,23 +16,4 @@ use PHPCI\Model\Base\ProjectBase;
*/
class Project extends ProjectBase
{
public function getGitUrl()
{
$key = $this->getGitKey();
switch($this->getType() . '.' . (!empty($key) ? 'ssh' : 'http'))
{
case 'github.ssh':
return 'git@github.com:' . $this->getReference() . '.git';
case 'github.http':
return 'https://github.com/' . $this->getReference() . '.git';
case 'bitbucket.ssh':
return 'git@bitbucket.org:' . $this->getReference() . '.git';
case 'bitbucket.http':
return 'https://bitbucket.org/' . $this->getReference() . '.git';
}
}
}