bazel/tooling: Use toolshed `json_data` macro (#29790)
As this is used in the api as well as Envoy itself the dep has been moved there. Signed-off-by: phlax <phlax@users.noreply.github.com> Mirrored from https://github.com/envoyproxy/envoy @ b0fec2ecdd54cf8a92a04a6d2481cdacd65c9d36main
parent
3887ffe42b
commit
2879bdc243
4 changed files with 19 additions and 19 deletions
@ -1,18 +0,0 @@ |
||||
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