diff options
Diffstat (limited to 'build.go')
| -rw-r--r-- | build.go | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -13,8 +13,6 @@ import ( ) func buildPackage(repo *gitpb.Repo) (bool, error) { - // TODO: if dirty, set GO111MODULE - // also, if last tag != version /* go install -ldflags " \ -X main.GITCOMMIT=${GITCOMMIT} \ @@ -76,24 +74,24 @@ func buildPackage(repo *gitpb.Repo) (bool, error) { cmd = append(cmd, "-v") cmd = append(cmd, "-x") } + cmd = append(cmd, repo.Namespace+"@v"+version) + if err := shell.PathExecVerbose("", cmd); err != nil { + badExit(err) + return false, fmt.Errorf("go build err %v", err) + } /* - cmd = append(cmd, "some path"+"@v"+version) + cmd = []string{"go"} + cmd = append(cmd, "build") + if argv.Verbose { + cmd = append(cmd, "-v") + cmd = append(cmd, "-x") + } + cmd = append(cmd, "this should be the path") if err := shell.PathExecVerbose("", cmd); err != nil { badExit(err) return false, fmt.Errorf("go build err %v", err) } */ - cmd = []string{"go"} - cmd = append(cmd, "build") - if argv.Verbose { - cmd = append(cmd, "-v") - cmd = append(cmd, "-x") - } - cmd = append(cmd, "this should be the path") - if err := shell.PathExecVerbose("", cmd); err != nil { - badExit(err) - return false, fmt.Errorf("go build err %v", err) - } log.Warn("build worked") } else { // set the GO111 build var to true. pass the versions to the compiler manually |
