diff --git a/build.go b/build.go index 0f4e80c91..e6237bf21 100644 --- a/build.go +++ b/build.go @@ -53,12 +53,14 @@ import ( // config contains the configuration for the program to build. var config = Config{ - Name: "restic", // name of the program executable and directory - Namespace: "github.com/restic/restic", // subdir of GOPATH, e.g. "github.com/foo/bar" - Main: "./cmd/restic", // package name for the main package - DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used - Tests: []string{"./..."}, // tests to run - MinVersion: GoVersion{Major: 1, Minor: 23, Patch: 0}, // minimum Go version supported + Name: "restic", // name of the program executable and directory + Namespace: "github.com/restic/restic", // subdir of GOPATH, e.g. "github.com/foo/bar" + Main: "./cmd/restic", // package name for the main package + // disable_grpc_modules is necessary to reduce the binary size since cloud.google.com/go/storage v1.44.0 + // see https://github.com/googleapis/google-cloud-go/issues/11448 + DefaultBuildTags: []string{"selfupdate", "disable_grpc_modules"}, // specify build tags which are always used + Tests: []string{"./..."}, // tests to run + MinVersion: GoVersion{Major: 1, Minor: 23, Patch: 0}, // minimum Go version supported } // Config configures the build. diff --git a/helpers/build-release-binaries/main.go b/helpers/build-release-binaries/main.go index 8fe8c24fb..d01bd93c1 100644 --- a/helpers/build-release-binaries/main.go +++ b/helpers/build-release-binaries/main.go @@ -106,7 +106,9 @@ func build(sourceDir, outputDir, goos, goarch string) (filename string) { } outputFile := filepath.Join(outputDir, filename) - tags := "selfupdate" + // disable_grpc_modules is necessary to reduce the binary size since cloud.google.com/go/storage v1.44.0 + // see https://github.com/googleapis/google-cloud-go/issues/11448 + tags := "selfupdate,disable_grpc_modules" if opts.Tags != "" { tags += "," + opts.Tags }