Replies: 1 comment
-
|
It could be an idea, for repos have the "monorepo" pattern, to have task behave like the go command: $task build ./...Which then dynamically imports taskfiles, starting from This would be somewhat similar to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi!
Thank you for the fantastic work on
task. Ever since discovering it, I've been using it everywhere.Context / Use Case
One thing I do quite frequently is to use
taskin monorepos or similar setups in a modular fashion, where I might e.g. have aTaskfile.ymland aTaskfile.root.ymlin the project root, aTaskfile.ymlinsidepackages(i.e. atpackages/Taskfile.yml) and package-specificTaskfile.ymls in each package (i.e. atpackages/*/Taskfile.yml).I then include all
packages/*/Taskfile.ymlinside thepackages/Taskfile.ymland I include theTaskfile.root.ymland thepackages/Taskfile.ymlinside the root-levelTaskfile.yml.This is nice and I can do
task r:fooandtask p:<packageName>:fooand so on.Pain Point
However, while it's easy and convenient to run one task at a time, it isn't so convenient to run 20 or so. Since I tend to divide my projects into many small sub-projects, that tends to happen quite frequently.
My Proposal / What I've Built
Therefore, I built a small go tool that wraps
taskand allows me to match tasks with globs and globstars and subsequently execute all of them, either sequentially.So if I have the following
Taskfile.ymldefined......then the tool will e.g. do:
1.
task "foo:*"2.
task "foo:**"3.
task p:**:bar:*I find it quite nifty, so I thought other people might find it useful too.
Interested?
I had a cursory look, but I didn't see that anything like it has been proposed or requested. Apologies if I've missed anything.
Would you be interested in adding this or something like it to
task? If so, I'd be happy to create a PR.I'm also all ears if you have other ideas and suggestions.
The Code
Anyway, here's the code.
Of course, this is just a small script I hacked together for my own purposes. The PR would of course be cleaner and try to match the code style of
task.Beta Was this translation helpful? Give feedback.
All reactions