aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2023-06-05 12:17:07 +0200
committerGitHub <noreply@github.com>2023-06-05 10:17:07 +0000
commitf5aa81cecbaf966fb9f749d4cd653ff16c9a7003 (patch)
treecf2d3175074704a65ecdc625b8cbd37441edb2d3
parentbcc4aebc014e5b9ed35067c508b80a9f1351d814 (diff)
downloadbazelbuild-rules_go-f5aa81cecbaf966fb9f749d4cd653ff16c9a7003.tar.gz
Fix `go_download_sdk` with Bazel dev versions (#3580)
The version check introduced in the previous commit did not take into account that dev versions of Bazel report an empty version string.
-rw-r--r--go/private/sdk.bzl4
1 files changed, 3 insertions, 1 deletions
diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl
index 1e6fadd8..a3fb6772 100644
--- a/go/private/sdk.bzl
+++ b/go/private/sdk.bzl
@@ -443,7 +443,9 @@ def _remote_sdk(ctx, urls, strip_prefix, sha256):
ctx.delete("go_sdk.tar.gz")
elif (urls[0].endswith(".zip") and
host_goos != "windows" and
- versions.is_at_least("6.0.0", versions.get())):
+ # Development versions of Bazel have an empty version string. We assume that they are
+ # more recent than the version that introduced rename_files.
+ versions.is_at_least("6.0.0", versions.get() or "6.0.0")):
ctx.download_and_extract(
url = urls,
stripPrefix = strip_prefix,