27. May 2010 16:31
Rake is a quite popular build framework, that has its strengths in the fact that it is code (no more xml), and it is very simple to get started with. Actually setting it up is a 3 step process.
- Make sure the path environment variable is set to point at your ironruby/bin folder.
- Run “igem install rake” from the commandline
- Write a Rakefile.rb like the following and place it at the root of your site
task :default => [:say_hi]
desc "Does quite a bit of greeting"
task :say_hi_to_me do
puts "Hello me. Now that was easy."
task :say_hi_to_world do
puts "Hi world!"
task :say_hi => [:say_hi_to_me,:say_hi_to_world] do
puts "I’m, all hellowed out"
This really all it takes, so now you are ready to run your tasks from the commandline by writing: “rake” or “rake say_hi_to_me”.
Now for this to get really interesting you will need albacore which makes it easy to do all kinds of basic tasks.
This is installed with the command “igem install albacore”, and makes it possible to do builds and run unittests like this:
task :default => [:full]
task :full => [:clean,:build_release,:run_tests]
task :clean do
msbuild :build_release do |msbuild|
msbuild.properties :configuration => :AutomatedRelease
msbuild.solution = "TestApp/TestApp.sln"
nunit :run_tests do |nunit|
nunit.path_to_command = "tools/nunit/nunit-console.exe"