Просмотр исходного кода

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>
Joe Tsai 6 лет назад
Родитель
Сommit
576cfb3dae
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      integration_test.go

+ 1 - 1
integration_test.go

@@ -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)