Skip to content

Commit

Permalink
cmd/releasebot: set GO111MODULE=off for go get .../cmd/release
Browse files Browse the repository at this point in the history
We specifically create a temporary GOPATH workspace in order to run
'go get golang.org/x/build/cmd/release' to install the release binary.
This was done with the intention to use GOPATH mode for the build.

Specify GO111MODULE=off explicitly so that GOPATH mode is always
used, regardless of local user configuration. This will produce
more consistent and reproducible results.

Installing the release binary in module mode is future work.

Fixes golang/go#33031

Change-Id: I1df009432be3d0af4e5e7679f38d147901d950e7
Reviewed-on: https://go-review.googlesource.com/c/build/+/193720
Reviewed-by: Alexander Rakoczy <alex@golang.org>
  • Loading branch information
dmitshur committed Sep 6, 2019
1 parent 6e17bfa commit a2cf194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/releasebot/main.go
Expand Up @@ -564,7 +564,7 @@ func (w *Work) buildReleaseBinary() {
if err := os.MkdirAll(gopath, 0777); err != nil {
w.log.Panic(err)
}
r := w.runner(w.Dir, "GOPATH="+gopath, "GOBIN="+filepath.Join(gopath, "bin"))
r := w.runner(w.Dir, "GO111MODULE=off", "GOPATH="+gopath, "GOBIN="+filepath.Join(gopath, "bin"))
r.run("go", "get", "golang.org/x/build/cmd/release")
w.ReleaseBinary = filepath.Join(gopath, "bin/release")
}
Expand Down

0 comments on commit a2cf194

Please sign in to comment.