-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
67 lines (50 loc) · 1.73 KB
/
Rakefile
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
62
63
64
65
66
67
require 'bundler/setup'
require 'albacore'
ci_build = ENV['APPVEYOR_BUILD_VERSION'] ||= "0"
tool_nuget = 'tools/nuget/nuget.exe'
tool_xunit = 'tools/xunit/xunit.console.clr4.exe'
project_name = 'Jess'
project_version = "1.0.#{ci_build}"
project_output = 'build/bin'
package_output = 'build/deploy'
build_mode = ENV['mode'] ||= "Debug"
desc 'Restore nuget packages for all projects'
nugets_restore :restore do |n|
n.exe = tool_nuget
n.out = 'packages'
end
desc 'Set the assembly version number'
asmver :version do |v|
v.file_path = "#{project_name}/Properties/AssemblyVersion.cs"
v.attributes assembly_version: project_version,
assembly_file_version: project_version
end
desc 'Compile all projects'
build :compile do |msb|
msb.target = [ :clean, :rebuild ]
msb.prop 'configuration', build_mode
msb.sln = "#{project_name}.sln"
end
desc 'Run all unit test assemblies'
test_runner :test do |xunit|
xunit.exe = tool_xunit
xunit.files = FileList['**/bin/*/*.tests.dll']
xunit.add_parameter '/silent'
end
desc 'Build all nuget packages'
nugets_pack :pack do |n|
FileUtils.mkdir_p package_output unless Dir.exists? package_output
n.configuration = build_mode
n.exe = tool_nuget
n.out = package_output
n.files = FileList["#{project_name}/*.csproj"]
n.with_metadata do |m|
m.description = 'A hydrator service for json requests, the "Json Edge Side Service".'
m.authors = 'Andy Dote'
m.project_url = "https://github.com/pondidum/#{project_name}"
m.license_url = "https://github.com/Pondidum/#{project_name}/blob/master/LICENSE.txt"
m.version = project_version
m.tags = 'json hydrator esi edgesideinclude service soa microservice'
end
end
task :default => [ :restore, :version, :compile, :test ]