Open basz opened 9 years ago
You could try to execute plan.run(task, target, options)
, fly does the same.
Please note that I never tried this, but I understand the use case, so please let me know if this works out for you.
Another idea is to write your tasks like this:
plan.local(['build-phar', 'deploy'], ...);
plan.local(['deploy'], ...);
When you now run fly deploy
, the build-phar
task is executed as well.
Had a long chat with @pstadler many centuries ago on a similar issue but now I cannot find it. I wanted to be able to do two things: (1) compose tasks using other tasks, (2) be able to say: fly task1,task2,task3:destination .......
After various stops and starts, I have a framework built on top of Flightplan to obtain the above. Not entirely sure that this is the right way to go about it.
plan.run(task, target, options)
does work indeed. however the current task isn't halted. can't rely on its result therefore.
i'v opted for exec('fly ...'), for now. thx
@basz thanks for reporting back. @ravi see #45. I wouldn't call this a discussion, as you didn't explain me that the current implementation is not enough for your needs.
So there are two use cases:
1) Running multiple tasks from command line (e.g. fly task1,task2:target
)
This could be done and makes sense somehow. Also the refactoring from 0.4.x to 0.5.x definitely makes this way easier to implement.
2) Running a task from a running task Not sure about this one.
@pstadler fair enough, I didn't want to get too deep into the matter on #45 (thanks for finding that) because I figured the need may be specific to me.
Let me add case 3: task1 has a dependency on task2, flightplan needs to provide a way to define this relationship.
Is there a -native- way to run sub-tasks, something similar of
The above works, but ANSI colors are lost and we get nested output.
ps. Apologies if this is not the place for support. Where should I ask these questions?