forked from PJensen/interlinkONE.PublicSuffix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile.rb
61 lines (49 loc) · 1.78 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
51
52
53
54
55
56
57
58
59
60
61
require 'albacore'
options = {
:configuration => "Debug",
:name => "PublicSuffix",
:output => "build"
}
task :default => [:build, :test]
desc "Clean the build directory"
task :clean do
rm_rf options[:output]
mkdir_p options[:output]
end
desc "Compile the solution"
msbuild :compile => :clean do |msb|
msb.targets [:Clean, :Build]
msb.solution = "src/#{options[:name]}.sln"
msb.properties :configuration => options[:configuration]
end
desc "Build the solution"
task :build => :compile do |msb|
cp_r "src/#{options[:name]}/bin/#{options[:configuration]}", "#{options[:output]}/#{options[:configuration]}"
end
desc "Run the specs"
mspec :test do |mspec|
# HACK: for some reason, mspec is looking for this in the current working directory
cp_r "specs/#{options[:name]}.Specs/bin/#{options[:configuration]}/data", "data"
mspec.path_to_command = "tools/Machine.Specifications/mspec.exe"
mspec.html_output = "#{options[:output]}/specs.html"
mspec.options "--timeinfo", "--silent"
mspec.assemblies "specs/#{options[:name]}.Specs/bin/#{options[:configuration]}/#{options[:name]}.Specs.dll"
end
desc "Generate the documentation"
docu :docs do |docu|
docu.path_to_command = "tools/docu/docu.exe"
docu.output_location = "#{options[:output]}/#{options[:configuration]}/docs"
docu.assemblies "src/#{options[:name]}/bin/#{options[:configuration]}/#{options[:name]}.dll"
end
desc "Build for Release"
task :release do
options[:configuration] = "Release"
Rake::Task[:build].invoke
Rake::Task[:docs].invoke
end
desc "Build zip file for Release"
zip :dist => :release do |zip|
zip.directories_to_zip "#{options[:output]}/#{options[:configuration]}"
zip.output_file = "#{options[:name]}-0.0.0.0-#{options[:configuration]}.zip"
zip.output_path = "#{options[:output]}"
end