added code to specify a gopath

This commit is contained in:
Brad Rydzewski
2014-06-12 12:51:55 -07:00
parent aec9b33048
commit 43e382b5a1
3 changed files with 18 additions and 5 deletions

View File

@@ -170,6 +170,9 @@ func (w *worker) execute(task *BuildTask) error {
}
func (w *worker) runBuild(task *BuildTask, buf io.Writer) (bool, error) {
var path = filepath.Join(task.Repo.Host, task.Repo.Owner, task.Repo.Name)
path = git.GitPath(task.Script.Git, path)
repo := &r.Repo{
Name: task.Repo.Host + task.Repo.Owner + task.Repo.Name,
Path: task.Repo.CloneURL,
@@ -177,7 +180,7 @@ func (w *worker) runBuild(task *BuildTask, buf io.Writer) (bool, error) {
Commit: task.Commit.Sha,
PR: task.Commit.PullRequest,
//TODO the builder should handle this
Dir: filepath.Join("/var/cache/drone/src", task.Repo.Host, task.Repo.Owner, task.Repo.Name),
Dir: filepath.Join("/var/cache/drone/src", path),
Depth: git.GitDepth(task.Script.Git),
}