From 7edb61c2d250d956f828d1d673acb3bf40d63d51 Mon Sep 17 00:00:00 2001 From: Son Luong Ngoc Date: Thu, 17 Aug 2023 11:56:53 +0200 Subject: [PATCH] Revert "use glob instead" This reverts commit 4b0181add8b5faba00527c62a7aa01dc146e61e3. --- go/private/BUILD.sdk.bazel | 2 +- go/private/sdk.bzl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/go/private/BUILD.sdk.bazel b/go/private/BUILD.sdk.bazel index ecc2a4c7fc..35c5ca1ee9 100644 --- a/go/private/BUILD.sdk.bazel +++ b/go/private/BUILD.sdk.bazel @@ -80,7 +80,7 @@ filegroup( "bin/go*", "src/**", "pkg/**", - "go.env*", + {goenv} ]), ) diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl index 08c6e74c00..c96730521d 100644 --- a/go/private/sdk.bzl +++ b/go/private/sdk.bzl @@ -478,6 +478,9 @@ def _sdk_build_file(ctx, platform, version, experiments): if not "nocoverageredesign" in experiments and not "coverageredesign" in experiments: experiments = experiments + ["nocoverageredesign"] + # TODO(sluongng): Remove this once we drop support for Go 1.20 + include_go_env = pv[1] >= 21 + ctx.template( "BUILD.bazel", ctx.path(ctx.attr._sdk_build_file), @@ -488,6 +491,7 @@ def _sdk_build_file(ctx, platform, version, experiments): "{exe}": ".exe" if goos == "windows" else "", "{version}": version, "{experiments}": repr(experiments), + "{goenv}": "\"go.env\"," if include_go_env else "", }, )