I'm using Rake to compile some annoying LaTeX stuff.
As a matter of fact, I'd like to clean my working dir before and after compiling.
So I defined two tasks: :clean
and :compile
.
Somehow naively, I wrote this:
task :default => [:clean, :compile, :clean]
but, as I discovered a little later while reading Rake's docs, this won't work because the array of tasks contains dependencies, not actions to make.
So, is there a clean way to execute a sequence of tasks without invoking them manually with Rake::Task("clean")
etc.?
Something similar to the dependencies array.
Just define your dependencies and rely on rake to figure out a valid order. Of course you will have a little trouble to execute the :clean task more than once, but you can reenable it or use an alias. Or you can define
in order to stay somewhat dry. As rake deals with dependencies and not with sequences it might just turn out to be a little more work than you liked.