I have two tasks, one that runs the tests and another that copies and sets up the config files. the task that runs the tests depends on the task that copies the files. For some reason the tests get run before the copy commands get executed when run under cruise, run from command line (by copying the ruby rake execution that cruise uses) it works fine.
A couple example tasks:
task :cruise_build => :task1 do
puts "cruise build"
end
task :task1 => :task2 do
puts "task 1"
end
task :task2 do
puts "task2"
cp 'config/solr.yml.template', 'config/solr.yml'
cp 'config/database.yml.template', 'config/database.yml'
cp 'config/memcache.yml.template', 'config/memcache.yml'
end
Command line output:
task2
cp config/solr.yml.template config/solr.yml
cp config/database.yml.template config/database.yml
cp config/memcache.yml.template config/memcache.yml
task 1
cruise build
Cruise Output:
task2
task 1
cruise build
cp config/solr.yml.template config/solr.yml
cp config/database.yml.template config/database.yml
cp config/memcache.yml.template config/memcache.yml
This is a problem since I need these files prepared before doing anything else. Any help with this issue at all would really be appreciated.