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(
84
84
repo_name = "proto_bazel_features" ,
85
85
)
86
86
87
+ bazel_dep (
88
+ name = "rules_shell" ,
89
+ version = "0.2.0"
90
+ )
91
+
87
92
# Proto toolchains
88
93
register_toolchains ("//bazel/private/toolchains:all" )
89
94
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
3
3
to wider Bazelification.
4
4
"""
5
5
6
+ load ("@rules_shell//shell:sh_binary.bzl" , "sh_binary" )
7
+ load ("@rules_shell//shell:sh_test.bzl" , "sh_test" )
8
+
6
9
def inline_sh_binary (
7
10
name ,
8
11
srcs = [],
@@ -41,7 +44,7 @@ def inline_sh_binary(
41
44
testonly = kwargs ["testonly" ] if "testonly" in kwargs else None ,
42
45
)
43
46
44
- native . sh_binary (
47
+ sh_binary (
45
48
name = name ,
46
49
srcs = [name + "_genrule" ],
47
50
data = srcs + tools + deps ,
@@ -86,7 +89,7 @@ def inline_sh_test(
86
89
testonly = kwargs ["testonly" ] if "testonly" in kwargs else None ,
87
90
)
88
91
89
- native . sh_test (
92
+ sh_test (
90
93
name = name ,
91
94
srcs = [name + "_genrule" ],
92
95
data = srcs + tools + deps ,
Original file line number Diff line number Diff line change 3
3
PLEASE DO NOT DEPEND ON THE CONTENTS OF THIS FILE, IT IS UNSTABLE.
4
4
"""
5
5
6
+ load ("@rules_shell//shell:sh_test.bzl" , "sh_test" )
7
+
6
8
def conformance_test (
7
9
name ,
8
10
testee ,
@@ -31,7 +33,7 @@ def conformance_test(
31
33
if maximum_edition :
32
34
args = args + ["--maximum_edition %s" % maximum_edition ]
33
35
34
- native . sh_test (
36
+ sh_test (
35
37
name = name ,
36
38
srcs = ["//conformance:bazel_conformance_test_runner.sh" ],
37
39
data = [testee ] + failure_lists + [
Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ def protobuf_deps():
104
104
sha256 = "6f3ce0e9fba979a844faba2d60467843fbf5191d8ca61fa3d2ea17655b56bb8c" ,
105
105
)
106
106
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
+
107
115
if not native .existing_rule ("proto_bazel_features" ):
108
116
proto_bazel_features (name = "proto_bazel_features" )
109
117
You can’t perform that action at this time.
0 commit comments