Properly handling Gitlab URLs that contain ports.

Fixes #484, closes #501
This commit is contained in:
Dan Cryer 2014-07-30 15:33:05 +01:00
commit 7986688b1e
2 changed files with 20 additions and 5 deletions

View file

@ -61,7 +61,17 @@ class GitlabBuild extends RemoteGitBuild
if (!empty($key)) {
$user = $this->getProject()->getAccessInformation("user");
$domain = $this->getProject()->getAccessInformation("domain");
return $user . '@' . $domain . ':' . $this->getProject()->getReference() . '.git';
$port = $this->getProject()->getAccessInformation('port');
$url = $user . '@' . $domain . ':';
if (!empty($port)) {
$url .= $port . '/';
}
$url .= $this->getProject()->getReference() . '.git';
return $url;
}
}
}