Skip to content

Commit 99bba9e

Browse files
committed
Explicitly load shell rules
1 parent 635c122 commit 99bba9e

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ bazel_dep(name = "protobuf", version = "29.1", repo_name = "com_google_protobuf"
1212
bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go")
1313
bazel_dep(name = "rules_nodejs", version = "6.3.2")
1414
bazel_dep(name = "rules_proto", version = "7.0.2")
15+
bazel_dep(name = "rules_shell", version = "0.4.0")
1516
# -- bazel_dep definitions -- #
1617

1718
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")

build/build_defs.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ load(
1919
"@io_bazel_rules_go//go:def.bzl",
2020
"GoSource",
2121
)
22+
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
23+
load("@rules_shell//shell:sh_test.bzl", "sh_test")
2224

2325
_GO_YACC_TOOL = "@org_golang_x_tools//cmd/goyacc"
2426

@@ -130,7 +132,7 @@ diff -q "$$F1" "$$F2"
130132
eof
131133
""",
132134
)
133-
native.sh_test(
135+
sh_test(
134136
name = src + "_checkshtest",
135137
size = "small",
136138
srcs = [src + "_check.sh"],
@@ -147,7 +149,7 @@ eof
147149
cmd = "echo 'cp $${BUILD_WORKSPACE_DIRECTORY}/$(location " + gen +
148150
") $${BUILD_WORKSPACE_DIRECTORY}/" + native.package_name() + "/" + src + "' > $@",
149151
)
150-
native.sh_binary(
152+
sh_binary(
151153
name = src + "_copy",
152154
srcs = [src + "_copysh"],
153155
data = [gen],

buildifier/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2+
load("@rules_shell//shell:sh_test.bzl", "sh_test")
23

34
go_binary(
45
name = "buildifier",

buildozer/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2+
load("@rules_shell//shell:sh_test.bzl", "sh_test")
23

34
go_library(
45
name = "buildozer_lib",

0 commit comments

Comments
 (0)