Skip to content

Commit

Permalink
Set --stamp=true when running a bazel release build
Browse files Browse the repository at this point in the history
Signed-off-by: James Munnelly <[email protected]>
  • Loading branch information
munnerz committed Jul 5, 2019
1 parent 9f7deed commit cd11389
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hack/release/pkg/bazel/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func (g *Bazel) Build(ctx context.Context, targets ...string) *exec.Cmd {
// Bazel's --platforms variable will be set automatically.
func (g *Bazel) BuildPlatform(ctx context.Context, os, arch string, targets ...string) *exec.Cmd {
platform := fmt.Sprintf("--platforms=@io_bazel_rules_go//go/toolchain:%s_%s", os, arch)
return g.Cmd(ctx, append([]string{"build", platform}, targets...)...)
// Set --stamp=true when running a build to workaround issues introduced
// in bazelbuild/rules_go#2110. For more information, see: https://github.com/bazelbuild/rules_go/pull/2110#issuecomment-508713878
// We should be able to remove the `--stamp=true` arg once this has been fixed!
return g.Cmd(ctx, append([]string{"build", platform, "--stamp=true"}, targets...)...)
}

// BuildE will build the given targets for the current host OS.
Expand Down

0 comments on commit cd11389

Please sign in to comment.