mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
release.bash: support reproducible builds
Manually specifying the "-buildid" removes the last source of variability when the release binaries is built on one system or another. See https://github.com/golang/go/issues/33772#issuecomment-528176001 Change-Id: Ibc9b8e99b5b76719735942a510570bcbf96dfea6 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/193498 Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
4b3a82f6b1
commit
576cfb3dae
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user