task :one => [:two, :three]
executes task two, three, then one (I have to test that the order is really this). But how to execute task ":two" in the middle of the code of another task?
Here is the solution:
desc "This task executes task two in its code!"
task :one do
# ... do domething
ENV['PAR1'] = 'xxx'
ENV['PAR2'] = 'yyy'
Rake::Task[ "two" ].execute
# ... do something
end
the ENV assignments and execute call have a similar effect to executing in your shell:
rake two PAR1 = xxx, PAR2 = yyy
Yeah, Rake is a really easy and cool tool for every scripting need...