feat(proto_extractor): add extra_action and action_listener
@@ -12,3 +12,25 @@ go_binary(
"@org_bitbucket_creachadair_stringset//:go_default_library",
],
)
+
+action_listener(
+ name = "extract_kzip",
+ extra_actions = [":extra_action_kzip"],
+ mnemonics = ["GenProtoDescriptorSet"],
+ visibility = ["//visibility:public"],
+)
+
+extra_action(
+ name = "extra_action_kzip",
+ cmd = " ".join([
+ "$(location :extract_proto_kzip)",
+ "--extra_action=$(EXTRA_ACTION_FILE)",
+ "--output=$(output $(ACTION_ID).proto.kzip)",
+ "--rules=$(location //external:vnames_config)",
+ "--corpus=DEFAULT",
+ "--language=protobuf",
+ ]),
+ data = ["//external:vnames_config"],
+ out_templates = ["$(ACTION_ID).proto.kzip"],
+ tools = [":extract_proto_kzip"],
+)
