Closed undyamon closed 1 year ago
This does make sense! Would you like to submit a PR?
For the make module itself?
Yes, could be a good built-in module and an interesting example. But you can have it in a separate repo of course.
Btw, I should mention that I very much like this plugin... simple, highly hackable and gets the job done. I have been running all sorts of tasks with it, from docker compose shenanigan to scripts on my personal notes.
Thank you, I'm glad you found it useful!
Hi, this is less of an issue and more of a "I found out how to do this and maybe someone will find it useful".
So, the idea is that it is possible to have dynamic tasks as part of a module. When creating your own module, you can do
An example would be to wrap
make
in a module and support arbitrary targets.With this, calling
Task start make install
will runmake install
(i.e., the task is mapped to themake
target). This behavior could also be customized if we have the following in our setupNow
Task start make build
->make
Task start make nuke
->make clean
By adding a metatable to
default_params.make.args
, it could be possible to add dynamic task parameters for dynamic tasks.Now, the example is not very useful unless one wants to use
make
with the same interface used for other modules, but you get the gist of it.