build: Move bazel/utils.bzl into api/bazel (#26858)
Move bazel/utils.bzl into api/bazel The api/... subtree depends on utils.bzl, but it is stored in //bazel, not //api/bazel. When the api sub-tree is exported as "data-plane-api", the resulting repository is not buildable. This attempts to fix that by changing the canonical location of utils.bzl and updating the references to it. Signed-off-by: Ryan Anderson <ryan@michonline.com> Mirrored from https://github.com/envoyproxy/envoy @ 35ef2c4eeac8e930e3c00e40baaea5271590db41pull/626/head
parent
84d576a549
commit
2110bf3692
2 changed files with 20 additions and 1 deletions
@ -0,0 +1,18 @@ |
||||
load("@bazel_skylib//rules:write_file.bzl", "write_file") |
||||
|
||||
def json_data( |
||||
name, |
||||
data, |
||||
visibility = ["//visibility:public"], |
||||
**kwargs): |
||||
"""Write a bazel object to a file |
||||
|
||||
The provided `data` object should be json serializable. |
||||
""" |
||||
write_file( |
||||
name = name, |
||||
out = "%s.json" % name, |
||||
content = json.encode(data).split("\n"), |
||||
visibility = visibility, |
||||
**kwargs |
||||
) |
Loading…
Reference in new issue