rapid-bird-79300
03/13/2024, 10:32 PM.sh
and .sh.tpl
.
I see this doc https://www.pantsbuild.org/2.18/docs/writing-plugins/the-target-api/extending-existing-targets
is the correct way to just extend the shell source value for for expected_file_extensions
?broad-processor-92400
03/14/2024, 3:33 AMsources
on shell_sources
targets by either:
• using a macro wrapping it shell_sources()
, like def my_shell_sources(sources=["*.sh", "*.sh.tpl"], **kwargs): return shell_sources(sources=sources,**kwargs)
• setting sources
with __defaults__
, e..g __defaults__({shell_sources: dict(sources=["*.sh", "*.sh.tpl"])})
I'm not sure either of those perfect. For instance, pants tailor ::
won't create a shell_sources
target within a directory that contains only .sh.tpl
files.curved-television-6568
03/14/2024, 8:46 AMcurved-television-6568
03/14/2024, 8:47 AM.sh
sources, but I think using __defaults__
is viable for your shell_sources
to pick up your .sh.tpl
files.rapid-bird-79300
03/14/2024, 4:45 PMshell_sources
target and globing all files from sub directories. It will be come painful since tailor can't be tuned for this