-
Notifications
You must be signed in to change notification settings - Fork 6
/
rakefile.rb
50 lines (38 loc) · 1.26 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
43
44
45
46
47
48
49
50
require 'build_utilities.rb'
require 'project.rb'
require 'rake/clean'
require 'fileutils'
local_settings = LocalSettings.new
mspec_options = []
COMPILE_TARGET = 'debug'
CLEAN.include("artifacts/*.*",'**/bin','**/obj')
#target folders that can be run from VS
project_startup_dir = File.join('product',"#{Project.startup_dir}")
project_test_dir = 'artifacts'
output_folders = [project_startup_dir,project_test_dir]
task :default => ["specs:run"]
task :init => :clean do
cp_r "thirdparty/machine.specifications/.","artifacts"
mkdir Project.specs_dir if ! File.exists?(Project.specs_dir)
mkdir Project.report_folder if ! File.exists?(Project.report_folder)
end
desc 'compiles the project'
task :compile do
MSBuildRunner.compile :compile_target => COMPILE_TARGET, :solution_file => 'solution.sln'
end
namespace :specs do
desc 'view the spec report'
task :view do
system "start #{Project.specs_dir}/#{Project.name}.specs.html"
end
desc 'run the specs for the project'
task :run => [:init,:compile] do
sh "artifacts/mspec.exe", "--html", "#{Project.specs_dir}/#{Project.name}.specs.html", "-x", "example", *(mspec_options + Project.spec_assemblies)
end
end
desc "open the solution"
task :sln do
Thread.new do
system "devenv solution.sln"
end
end