From 5e8bd1007e422ba2c2b1e9bdbcf653c3fc241f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Bach=C3=A9?= Date: Wed, 5 Mar 2025 14:47:18 +0100 Subject: [PATCH] use starlark sh_binary Required to properly handle Bazel 8 --- MODULE.bazel | 1 + skylib/kustomize/BUILD | 2 ++ skylib/kustomize/kustomize.bzl | 2 ++ 3 files changed, 5 insertions(+) diff --git a/MODULE.bazel b/MODULE.bazel index 9e288bdc..c28c2873 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,6 +9,7 @@ bazel_dep(name = "platforms", version = "0.0.8") bazel_dep(name = "rules_oci", version = "1.7.2") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "rules_go", version = "0.44.0", repo_name = "io_bazel_rules_go") +bazel_dep(name = "rules_shell", version = "0.4.0") go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") go_sdk.download(version = "1.21.5") diff --git a/skylib/kustomize/BUILD b/skylib/kustomize/BUILD index 142995fe..32d11c03 100644 --- a/skylib/kustomize/BUILD +++ b/skylib/kustomize/BUILD @@ -8,6 +8,8 @@ # OF ANY KIND, either express or implied. See the License for the specific language # governing permissions and limitations under the License. +load("@rules_shell//shell:sh_binary.bzl", "sh_binary") + exports_files([ "run-all.sh.tpl", "kubectl.sh.tpl", diff --git a/skylib/kustomize/kustomize.bzl b/skylib/kustomize/kustomize.bzl index 8a82ec7a..df1e489d 100644 --- a/skylib/kustomize/kustomize.bzl +++ b/skylib/kustomize/kustomize.bzl @@ -26,6 +26,8 @@ def _download_kustomize_impl(ctx): fail("Platform " + ctx.os.name + " is not supported") ctx.file("BUILD", """ +load("@rules_shell//shell:sh_binary.bzl", "sh_binary") + sh_binary( name = "kustomize", srcs = ["bin/kustomize"],