Skip to content

Commit

Permalink
release.bash: support reproducible builds
Browse files Browse the repository at this point in the history
Manually specifying the "-buildid" removes the last source of variability
when the release binaries is built on one system or another.

See golang/go#33772 (comment)

Change-Id: Ibc9b8e99b5b76719735942a510570bcbf96dfea6
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/193498
Reviewed-by: Damien Neil <[email protected]>
  • Loading branch information
dsnet committed Sep 5, 2019
1 parent 4b3a82f commit 576cfb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func mustHandleFlags(t *testing.T) {

// Build the binary.
cmd := command{Env: append(os.Environ(), "GOOS="+goos, "GOARCH="+goarch)}
cmd.mustRun(t, "go", "build", "-trimpath", "-ldflags", "-s -w", "-o", binPath, "./cmd/protoc-gen-go")
cmd.mustRun(t, "go", "build", "-trimpath", "-ldflags", "-s -w -buildid=", "-o", binPath, "./cmd/protoc-gen-go")

// Archive and compress the binary.
in, err := ioutil.ReadFile(binPath)
Expand Down

0 comments on commit 576cfb3

Please sign in to comment.