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:
parent
1a92d1c619
commit
be37a5e821
9 changed files with 304 additions and 150 deletions
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue