Let's say I have a directory testdata with 5 files...
# general
p
Let's say I have a directory testdata with 5 files in it. Can I somehow loop in a BUILD file to create a resource for each file in the testdata dir?
b
Target generators like
resources
are best, but if you have to, normal Python loops work too, e.g. we have a BUILD file with a loop like
Copy code
info = [("a", 123), ("b", 456), ...]
for x, y in info:
    some_target(name=x, some_field=x, other_field=y)
👍 1