Skip to content
Henrik edited this page Aug 21, 2014 · 1 revision

Call NAnt tasks from within your rakefile.

desc "Run a sample build"
nant :build do |cmd|
  cmd.command = "path/to/nant"
  cmd.build_file = "path/to/buildfile"
  cmd.properties = {:debug => true, "build.mode" => :fast}
  cmd.targets = [:Clean, :Build, :Specs]
end

Required Parameters

Command

The location of the nant command line application.

command = "path/to/nant"

Optional Parameters

Build File

The nant build file that specifies the target(s) you want to run. If you don't provide a valid nant build file, nant will try to use the first *.build file it finds in the current directory.

build_file = "path/to/buildfile"

Properties

Any valid NAnt command line property, as a hash literal.

properties = {:foo => "foo", :bar => "bar"}

Targets

Any valid target for your NAnt build file, as an array.

targets = [:rebuild]

No Logo

Hide the startup banner.

no_logo

Guidance

(none)

Clone this wiki locally