【发布时间】:2023-04-02 01:15:01
【问题描述】:
我有以下genrule,它会生成一个新的buf 图像文件:
genrule(
name = "build_buf_image",
srcs = [":proto_srcs"],
outs = ["go/src/grail.com/examples/microservice-grpc/server/apimodels/grpc/buf-image.json"],
cmd = "$(location //third_party/buf:generate-image) $(OUTS) $(SRCS)",
tools = [
"//third_party/buf:generate-image",
"@buf",
"@jq",
],
)
但在执行之前,我希望运行以下测试:
buf_proto_breaking_test(
name = "proto_breaking_check",
against_input = "buf-image.json",
protos = [
":proto_lib",
],
)
如何做到这一点?有没有办法让genrule 依赖测试?
【问题讨论】:
标签: bazel