I'm thinking of the following use-case:
1+n repositories, each of them using a few specialized tasks, while sharing a lot of "common" code. It should be possible for me to include other Taskfile.yml and even Taskvars.yml files. This makes it easier to share code between runners while staying as flexible as possible.
References could either be files directly, directories or, ideally, HTTP endpoints or even (git) repositories.
I have been thinking about the same (but for files only, and within one repo )...
Example syntax (Taskfile.yml only):
import:
- "subdir/"
- "subdir2/Taskfile.yml"
It has one issue, and that is that tasks are now on the top-level, so if you add an include or import group, it's slightly counter-intuitive. Also, we would need to consider namespaces to avoid naming collisions.
However, reuse of task in other Taskfiles is _already_ possible today. as you could rely on calling task via cmds:
subdir/subtask:
dir: subdir
cmds:
- task subtask
status:
- task subtask-status
You loose the up-to-date resolution if you call this tasks as dependencies, but as shown, that can be resolved by implementing a custom status check.
I vote for closing this in favour of #98, which has a very clear suggestion for the syntax.
I agree, thank you!
Most helpful comment
I vote for closing this in favour of #98, which has a very clear suggestion for the syntax.