File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,11 @@ bazel_dep(
8484 repo_name = "proto_bazel_features" ,
8585)
8686
87+ bazel_dep (
88+ name = "rules_shell" ,
89+ version = "0.2.0"
90+ )
91+
8792# Proto toolchains
8893register_toolchains ("//bazel/private/toolchains:all" )
8994
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ Internal tools to migrate shell commands to Bazel as an intermediate step
33to wider Bazelification.
44"""
55
6+ load ("@rules_shell//shell:sh_binary.bzl" , "sh_binary" )
7+ load ("@rules_shell//shell:sh_test.bzl" , "sh_test" )
8+
69def inline_sh_binary (
710 name ,
811 srcs = [],
@@ -41,7 +44,7 @@ def inline_sh_binary(
4144 testonly = kwargs ["testonly" ] if "testonly" in kwargs else None ,
4245 )
4346
44- native . sh_binary (
47+ sh_binary (
4548 name = name ,
4649 srcs = [name + "_genrule" ],
4750 data = srcs + tools + deps ,
@@ -86,7 +89,7 @@ def inline_sh_test(
8689 testonly = kwargs ["testonly" ] if "testonly" in kwargs else None ,
8790 )
8891
89- native . sh_test (
92+ sh_test (
9093 name = name ,
9194 srcs = [name + "_genrule" ],
9295 data = srcs + tools + deps ,
Original file line number Diff line number Diff line change 33PLEASE DO NOT DEPEND ON THE CONTENTS OF THIS FILE, IT IS UNSTABLE.
44"""
55
6+ load ("@rules_shell//shell:sh_test.bzl" , "sh_test" )
7+
68def conformance_test (
79 name ,
810 testee ,
@@ -31,7 +33,7 @@ def conformance_test(
3133 if maximum_edition :
3234 args = args + ["--maximum_edition %s" % maximum_edition ]
3335
34- native . sh_test (
36+ sh_test (
3537 name = name ,
3638 srcs = ["//conformance:bazel_conformance_test_runner.sh" ],
3739 data = [testee ] + failure_lists + [
Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ def protobuf_deps():
104104 sha256 = "6f3ce0e9fba979a844faba2d60467843fbf5191d8ca61fa3d2ea17655b56bb8c" ,
105105 )
106106
107+ if not native .existing_rule ("rules_shell" ):
108+ http_archive (
109+ name = "rules_shell" ,
110+ sha256 = "410e8ff32e018b9efd2743507e7595c26e2628567c42224411ff533b57d27c28" ,
111+ strip_prefix = "rules_shell-0.2.0" ,
112+ url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.2.0/rules_shell-v0.2.0.tar.gz" ,
113+ )
114+
107115 if not native .existing_rule ("proto_bazel_features" ):
108116 proto_bazel_features (name = "proto_bazel_features" )
109117
You can’t perform that action at this time.
0 commit comments