-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile.rb
42 lines (34 loc) · 1.4 KB
/
rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
include FileTest
require 'albacore'
COMPILE_TARGET = "debug"
PROJECT_ROOT = File.dirname(__FILE__)
OUTPUT_DIR = File.join(PROJECT_ROOT, "build/bin/#{COMPILE_TARGET}/")
desc "Create build"
task :all => [:config, :compile]
desc "Prepares the working directory for a new build"
task :clean do
Dir.mkdir OUTPUT_DIR unless exists?(OUTPUT_DIR)
end
desc "Expand .config files for the correct environment"
expandtemplates :config, [:env] do |tmp, args|
args.with_defaults(:env => "local")
tmp.expand_files(
"build/config/web.config.template" => "src/ScheduMail.WebMvcSpark/web.config",
"build/config/schedumailrunner.app.config.template" => "src/ScheduleMailRunner/app.config")
tmp.data_file = "build/config/#{args.env}.settings"
end
desc "Create a build"
msbuild :compile => [:clean] do |msb|
msb.properties = {:configuration => :Debug, :OutDir => OUTPUT_DIR}
msb.targets [:Clean, :Rebuild]
msb.verbosity = "minimal"
msb.solution = "src/ScheduMail.sln"
end
desc "Runs unit tests"
task :test => [:unit_test]
desc "Runs unit tests"
nunit :unit_test => [:compile] do |nunit|
testpath = "build/bin/#{COMPILE_TARGET}"
nunit.path_to_command = "lib/NUnit/nunit-console.exe"
nunit.assemblies "#{testpath}/ScheduMail.CoreTest.dll", "#{testpath}/ScheduMail.Spark.TemplateParserTest.dll", "#{testpath}/ScheduMail.UnitsOfWorkTests.dll"
end