Use rules_shell's sh_binary and sh_test (#4182)
Bazel 8 deletes all native shell rules. In order for other rule
repositories (i.e. rules_android) to use rules_go, the references to
native sh_* must be converted to rules_shell's respective versions.
Unblocks https://github.com/bazelbuild/rules_android/issues/278
**What type of PR is this?**
Bug fix
**What does this PR do? Why is it needed?**
Adds rules_shell dep and properly loads sh_binary/test where applicable.
**Which issues(s) does this PR fix?**
Without this PR, rule repositories cannot depend upon rules_go with
Bazel 8.
Fixes #4181.
**Other notes for review**
diff --git a/WORKSPACE b/WORKSPACE
index 49dd993..862aad8 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -245,6 +245,19 @@
apple_support_dependencies()
+http_archive(
+ name = "rules_shell",
+ sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53",
+ strip_prefix = "rules_shell-0.3.0",
+ url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz",
+)
+
+load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
+
+rules_shell_dependencies()
+
+rules_shell_toolchains()
+
load("@googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(