Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/cmd/releasebot: build release binary in module mode #36950

Open
dmitshur opened this issue Jan 31, 2020 · 0 comments
Open

x/build/cmd/releasebot: build release binary in module mode #36950

dmitshur opened this issue Jan 31, 2020 · 0 comments

Comments

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jan 31, 2020

In the following method:

func (w *Work) buildReleaseBinary() {

The golang.org/x/build/cmd/release binary is built explicitly in GOPATH mode, with a clean, deterministic GOPATH workspace.

releasebot should be updated to build release binary in module mode.

Making the change may result in different versions of its dependencies being used:

  • cloud.google.com/go/storage
  • golang.org/x/sync/errgroup
  • google.golang.org/api/iterator

We should confirm that making this change won't influence a release negatively, and do the switch.

Building the release binary should continue to be reproducible and unaffected by user's local environment. This can be done by overriding environment variables from environment with explicit ones, as it was done when building in GOPATH mode:

r := w.runner(w.Dir, "GO111MODULE=off", "GOPATH="+gopath, "GOBIN="+filepath.Join(gopath, "bin"))
r.run("go", "get", "golang.org/x/build/cmd/release")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.