Skip to content

Commit 76f567e

Browse files
authored
Merge pull request #842 from kubernetes-sigs/master
Fix cross compilation issue with bazel 0.26+
2 parents eaebce4 + 8e12155 commit 76f567e

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

WORKSPACE

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@
1313
# limitations under the License.
1414

1515
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
16-
17-
http_archive(
16+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
17+
18+
# Use the git repository for bazel rules until a released version contains https://github.com/bazelbuild/rules_go/pull/2090
19+
# http_archive(
20+
# name = "io_bazel_rules_go",
21+
# urls = [
22+
# "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
23+
# "https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
24+
# ],
25+
# sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
26+
# )
27+
git_repository(
1828
name = "io_bazel_rules_go",
19-
urls = [
20-
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
21-
"https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
22-
],
23-
sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
29+
remote = "https://github.com/bazelbuild/rules_go.git",
30+
commit = "f2373c9fbd09586d8e591dda3c43d66445b2d7ca",
2431
)
2532

2633
http_archive(
@@ -53,7 +60,7 @@ http_archive(
5360
load("@bazel_skylib//lib:versions.bzl", "versions")
5461

5562
versions.check(
56-
minimum_bazel_version = "0.21.0",
63+
minimum_bazel_version = "0.23.0",
5764
maximum_bazel_version = "1.0.0",
5865
) # fails if not within range
5966

0 commit comments

Comments
 (0)