I have a need to write a rule which zips up all transitive config files (*.foo) of an executable (can be custom rule, java_binary and docker container_image).
The config files can appear on the srcs attribute of any attribute of the executable (tars, deps, runtime_deps, etc)
This sounds like it should be rather easy to do with an aspect attached to my rule but I lost my way between the various examples.
sources_aspect.bzl:sources.bzl