Fix generating project source repo URL in openshift buildconfig.

This commit is contained in:
Ratnadeep Debnath 2016-10-27 17:09:14 +05:30
parent efc5203d82
commit 6156d144f2

View File

@ -83,7 +83,13 @@ func getGitRemote(remote string) string {
if err != nil {
return ""
}
return strings.TrimRight(string(out), "\n")
url := strings.TrimRight(string(out), "\n")
if !strings.HasSuffix(url, ".git") {
url += ".git"
}
return url
}
// getAbsBuildContext returns build context relative to project root dir