blob: 9360b057604ee5edbeb80b4acadf703ad18ae43b [file]
"multitool module extension"
load("//multitool/private:multitool.bzl", _hub = "hub")
hub = tag_class(
attrs = {
"lockfile": attr.label(mandatory = True, allow_single_file = True),
},
)
def _extension(module_ctx):
lockfiles = []
for mod in reversed(module_ctx.modules):
for h in mod.tags.hub:
lockfiles.append(h.lockfile)
# TODO: we should be able to support multiple hubs
_hub(
name = "multitool",
lockfiles = lockfiles,
)
multitool = module_extension(
implementation = _extension,
tag_classes = {
"hub": hub,
},
)