forked from MassTransit/MassTransit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile.rb
494 lines (402 loc) · 25 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
COPYRIGHT = "Copyright 2007-2011 Chris Patterson, Dru Sellers, Travis Smith, et. al. - All rights reserved."
require File.dirname(__FILE__) + "/build_support/BuildUtils.rb"
require File.dirname(__FILE__) + "/build_support/util.rb"
include FileTest
require 'albacore'
require File.dirname(__FILE__) + "/build_support/ilmergeconfig.rb"
require File.dirname(__FILE__) + "/build_support/ilmerge.rb"
PRODUCT = 'MassTransit'
CLR_TOOLS_VERSION = 'v4.0.30319'
REVISION = 5
build_number_base = "2.0.0"
asm_version = build_number_base + "." + REVISION.to_s
tc_build_number = '0'
tc_build_number = ENV["BUILD_NUMBER"] unless ENV['BUILD_NUMBER'].nil?
BUILD_NUMBER = "#{build_number_base}.#{tc_build_number}"
BUILD_CONFIG = ENV['BUILD_CONFIG'] || "Release"
BUILD_CONFIG_KEY = ENV['BUILD_CONFIG_KEY'] || 'NET40'
BUILD_PLATFORM = ''
TARGET_FRAMEWORK_VERSION = (BUILD_CONFIG_KEY == "NET40" ? "v4.0" : "v3.5")
MSB_USE = (BUILD_CONFIG_KEY == "NET40" ? :net4 : :net35)
OUTPUT_PATH = (BUILD_CONFIG_KEY == "NET40" ? 'net-4.0' : 'net-3.5')
props = {
:src => File.expand_path("src"),
:lib => File.expand_path("lib"),
:build_support => File.expand_path("build_support"),
:stage => File.expand_path("build_output"),
:output => File.join( File.expand_path("build_output"), OUTPUT_PATH ),
:artifacts => File.expand_path("build_artifacts"),
:projects => ["MassTransit", "MassTransit.RuntimeServices"]
}
desc "Cleans, compiles, il-merges, unit tests, prepares examples, packages zip and runs MoMA"
task :all => [:clean, :compile, :compile_samples, :ilmerge, :copy_services, :tests]
desc "**Default**, compiles and runs tests"
task :default => [:clean, :compile, :compile_samples, :ilmerge, :copy_services]
desc "**DOOES NOT CLEAR OUTPUT FOLDER**, compiles and runs tests"
task :unclean => [:compile, :ilmerge, :tests]
desc "Update the common version information for the build. You can call this task without building."
assemblyinfo :global_version do |asm|
commit_data = get_commit_hash_and_date
commit = commit_data[0]
commit_date = commit_data[1]
puts "##teamcity[buildNumber '#{BUILD_NUMBER}']"
# Assembly file config
asm.product_name = PRODUCT
asm.description = "MassTransit is a distributed application framework for .NET http://masstransit-project.com"
asm.version = asm_version
asm.file_version = BUILD_NUMBER
asm.custom_attributes :AssemblyInformationalVersion => "#{asm_version}",
:ComVisibleAttribute => false,
:CLSCompliantAttribute => false
asm.copyright = COPYRIGHT
asm.output_file = 'src/SolutionVersion.cs'
asm.namespaces "System", "System.Reflection", "System.Runtime.InteropServices", "System.Security"
end
desc "Prepares the working directory for a new build"
task :clean do
FileUtils.rm_rf props[:artifacts]
FileUtils.rm_rf props[:stage]
# work around latency issue where folder still exists for a short while after it is removed
waitfor { !exists?(props[:stage]) }
waitfor { !exists?(props[:artifacts]) }
Dir.mkdir props[:stage]
Dir.mkdir props[:artifacts]
end
task :compile_samples => [:compile, :build_starbucks, :build_distributor] do
end
desc "Cleans, versions, compiles the application and generates build_output/."
task :compile => [:global_version, :build] do
puts 'Copying unmerged dependencies to output folder'
copyOutputFiles File.join(props[:src], "MassTransit/bin/#{BUILD_CONFIG}"), "log4net.{dll,pdb,xml}", props[:output]
copyOutputFiles File.join(props[:src], "MassTransit/bin/#{BUILD_CONFIG}"), "Magnum.{dll,pdb,xml}", props[:output]
copyOutputFiles File.join(props[:src], "Persistence/MassTransit.NHibernateIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.NHibernateIntegration.{dll,pdb,xml}", File.join(props[:output], "Persistence/NHibernate")
outc = File.join(props[:output], "Containers")
copyOutputFiles File.join(props[:src], "Containers/MassTransit.StructureMapIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.StructureMapIntegration.{dll,pdb,xml}", outc
copyOutputFiles File.join(props[:src], "Containers/MassTransit.UnityIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.UnityIntegration.{dll,pdb,xml}", outc
copyOutputFiles File.join(props[:src], "Containers/MassTransit.WindsorIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.WindsorIntegration.{dll,pdb,xml}", outc
copyOutputFiles File.join(props[:src], "Containers/MassTransit.NinjectIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.NinjectIntegration.{dll,pdb,xml}", outc
copyOutputFiles File.join(props[:src], "Containers/MassTransit.AutofacIntegration/bin/#{BUILD_CONFIG}"), "MassTransit.AutofacIntegration.{dll,pdb,xml}", outc
outt = File.join(props[:output], "Transports")
copyOutputFiles File.join(props[:src], "Transports/MassTransit.Transports.MSMQ/bin/#{BUILD_CONFIG}"), "MassTransit.Transports.MSMQ.{dll,pdb,xml}", File.join(outt, "MSMQ")
copyOutputFiles File.join(props[:src], "Transports/MassTransit.Transports.RabbitMq/bin/#{BUILD_CONFIG}"), "MassTransit.Transports.RabbitMq.{dll,pdb,xml}", File.join(outt, "RabbitMQ")
copyOutputFiles File.join(props[:src], "Transports/MassTransit.Transports.RabbitMq/bin/#{BUILD_CONFIG}"), "RabbitMQ*.{dll,pdb,xml}", File.join(outt, "RabbitMQ")
end
task :ilmerge => [:ilmerge_masstransit] do
end
ilmerge :ilmerge_masstransit do |ilm|
out = File.join(props[:output], 'MassTransit.dll')
ilm.output = out
ilm.internalize = File.join(props[:build_support], 'internalize.txt')
ilm.working_directory = File.join(props[:src], "MassTransit/bin/#{BUILD_CONFIG}")
ilm.target = :library
ilm.use MSB_USE
ilm.log = File.join( props[:src], "MassTransit","bin","#{BUILD_CONFIG}", 'ilmerge.log' )
ilm.allow_dupes = true
ilm.references = [ 'MassTransit.dll', 'Stact.dll', 'Newtonsoft.Json.dll']
end
desc "Copying Services"
task :copy_services => [:compile] do
puts "Copying services"
targ = File.join(props[:stage], 'Services', 'RuntimeServices')
src = File.join(props[:src], "MassTransit.RuntimeServices/bin/#{BUILD_CONFIG}")
copyOutputFiles src, "MassTransit.*.{dll,exe,config,log4net.xml,sdf}", targ
copyOutputFiles props[:output], 'MassTransit.dll', targ
copyOutputFiles src, "Castle*.dll", targ
copyOutputFiles src, "log4net.dll", targ
copyOutputFiles src, "Magnum.dll", targ
copyOutputFiles src, "FluentNHibernate.dll", targ
copyOutputFiles src, "NHibernate*.dll", targ
copyOutputFiles src, "Iesi.Collections.dll", targ
copyOutputFiles src, "StructureMap.dll", targ
copyOutputFiles src, "Topshelf.dll", targ
copyOutputFiles File.join(props[:lib], 'SqlCe'), '*', targ
copyOutputFiles File.join(props[:lib], 'SqlCe', 'x86'), '*', File.join(targ, 'x86')
copyOutputFiles File.join(props[:lib], 'SqlCe', 'x86', 'Microsoft.VC90.CRT'), '*', File.join(targ, 'x86', 'Microsoft.VC90.CRT')
copyOutputFiles File.join(props[:lib], 'SqlCe', 'amd64'), '*', File.join(targ, 'amd64')
copyOutputFiles File.join(props[:lib], 'SqlCe', 'amd64', 'Microsoft.VC90.CRT'), '*', File.join(targ, 'amd64', 'Microsoft.VC90.CRT')
targ = File.join(props[:stage], 'Services', 'SystemView')
src = File.join(props[:src], "MassTransit.SystemView/bin/#{BUILD_CONFIG}")
copyOutputFiles src, "MassTransit.*.{dll,exe,config}", targ
copyOutputFiles props[:output], 'MassTransit.dll', targ
copyOutputFiles src, "log4net.dll", targ
copyOutputFiles src, "Magnum.dll", targ
copyOutputFiles src, "StructureMap.dll", targ
targ = File.join(props[:stage], 'Services', 'BusDriver')
src = File.join(props[:src], "Tools/BusDriver/bin/#{BUILD_CONFIG}")
copyOutputFiles src, "BusDriver.{exe}", targ
copyOutputFiles src, "MassTransit.*.{dll,exe,config}", targ
copyOutputFiles src, "RabbitMQ.Client.{dll}", targ
copyOutputFiles props[:output], 'MassTransit.dll', targ
copyOutputFiles src, "log4net.dll", targ
copyOutputFiles src, "Magnum.dll", targ
targ = File.join(props[:stage], 'Services', 'SystemView2')
src = File.join(props[:src], "MassTransit.SystemView2/bin/#{BUILD_CONFIG}")
copyOutputFiles src, "MassTransit.*.{dll,exe,config}", targ
copyOutputFiles props[:output], 'MassTransit.dll', targ
copyOutputFiles src, "log4net.dll", targ
copyOutputFiles src, "Magnum.dll", targ
copyOutputFiles src, "StructureMap.dll", targ
copyOutputFiles src, "WPFToolkit.dll", targ
targ = File.join(props[:stage], 'Samples', 'Starbucks')
src = File.join(props[:src], "Samples", "Starbucks")
copyOutputFiles props[:output], "MassTransit.dll", targ
copyOutputFiles File.join(src, "Starbucks.Customer/bin/#{BUILD_CONFIG}"), "{log4net,Magnum,MassTransit.StructureMapIntegration,MassTransit.Transports.Msmq,StructureMap}.dll", targ
copyOutputFiles File.join(src, "Starbucks.Barista/bin/#{BUILD_CONFIG}"), "{MassTransit.WindsorIntegration,Castle.Windsor,Castle.Core,Topshelf}.dll", targ
copyOutputFiles File.join(src, "Starbucks.Cashier/bin/#{BUILD_CONFIG}"), "{MassTransit.NinjectIntegration,Ninject}.dll", targ
copyOutputFiles File.join(src, "Starbucks.Cashier/bin/#{BUILD_CONFIG}"), "Starbucks.Cashier.exe", targ
copyOutputFiles File.join(src, "Starbucks.Cashier/bin/#{BUILD_CONFIG}"), "cashier.log4net.xml", targ
copyOutputFiles File.join(src, "Starbucks.Barista/bin/#{BUILD_CONFIG}"), "Starbucks.Barista.exe", targ
copyOutputFiles File.join(src, "Starbucks.Barista/bin/#{BUILD_CONFIG}"), "barista.log4net.xml", targ
copyOutputFiles File.join(src, "Starbucks.Customer/bin/#{BUILD_CONFIG}"), "Starbucks.Customer.exe", targ
copyOutputFiles File.join(src, "Starbucks.Customer/bin/#{BUILD_CONFIG}"), "customer.log4net.xml", targ
copyOutputFiles File.join(src, "Starbucks.Customer/bin/#{BUILD_CONFIG}"), "Starbucks.Messages.dll", targ
targ = File.join(props[:stage], 'Samples', 'Distributor')
src = File.join(props[:src], "Samples", "Distributor")
copyOutputFiles props[:output], "MassTransit.dll", targ
copyOutputFiles File.join(src, "Grid.Distributor.Activator/bin/#{BUILD_CONFIG}"), "{log4net,Magnum,MassTransit.StructureMapIntegration,MassTransit.Transports.Msmq,StructureMap,Topshelf}.dll", targ
copyOutputFiles File.join(src, "Grid.Distributor.Activator/bin/#{BUILD_CONFIG}"), "Grid.Distributor.Activator.exe", targ
copyOutputFiles File.join(src, "Grid.Distributor.Activator/bin/#{BUILD_CONFIG}"), "Grid.Distributor.Shared.dll", targ
copyOutputFiles File.join(src, "Grid.Distributor.Activator/bin/#{BUILD_CONFIG}"), "*.config", targ
copyOutputFiles File.join(src, "Grid.Distributor.Worker/bin/#{BUILD_CONFIG}"), "Grid.Distributor.Worker.exe", targ
copyOutputFiles File.join(src, "Grid.Distributor.Worker/bin/#{BUILD_CONFIG}"), "*.config", targ
end
#desc "Prepare examples"
#task :prepare_examples => [:compile] do#
# puts "Preparing samples"
# targ = File.join(props[:output], 'Services', 'clock' )
# copyOutputFiles File.join(props[:src], "Samples/StuffOnAShelf/bin/#{BUILD_CONFIG}"), "clock.*", targ
# copyOutputFiles File.join(props[:src], "Samples/StuffOnAShelf/bin/#{BUILD_CONFIG}"), "StuffOnAShelf.{dll}", targ
# copyOutputFiles props[:output], "Topshelf.{dll}", targ
# copyOutputFiles props[:output], "log4net.{dll,pdb}", targ
# copy('doc/Using Shelving.txt', props[:output])
# copy('doc/log4net.config.example', props[:output])
# commit_data = get_commit_hash_and_date
# what_commit = File.new File.join(props[:output], "#{commit_data[0]} - #{commit_data[1]}.txt"), "w"
# what_commit.puts "The file name denotes what commit these files were built off of. You can also find that information in the assembly info accessible through code."
# what_commit.close
#end
desc "Only compiles the application."
msbuild :build do |msb|
msb.properties :Configuration => BUILD_CONFIG,
:BuildConfigKey => BUILD_CONFIG_KEY,
:TargetFrameworkVersion => TARGET_FRAMEWORK_VERSION,
:Platform => 'Any CPU'
msb.properties[:TargetFrameworkVersion] = TARGET_FRAMEWORK_VERSION unless BUILD_CONFIG_KEY == 'NET35'
msb.use :net4 #MSB_USE
msb.targets :Clean, :Build
msb.solution = 'src/MassTransit.sln'
end
msbuild :build_starbucks do |msb|
msb.properties :Configuration => "Build",
:BuildConfigKey => BUILD_CONFIG_KEY,
:TargetFrameworkVersion => TARGET_FRAMEWORK_VERSION,
:Platform => 'Any CPU'
msb.properties[:TargetFrameworkVersion] = TARGET_FRAMEWORK_VERSION unless BUILD_CONFIG_KEY == 'NET35'
msb.use :net4 #MSB_USE
msb.targets :Clean, :Build
msb.solution = 'src/Samples/Starbucks/Starbucks.sln'
end
msbuild :build_distributor do |msb|
msb.properties :Configuration => "Build",
:BuildConfigKey => BUILD_CONFIG_KEY,
:TargetFrameworkVersion => TARGET_FRAMEWORK_VERSION,
:Platform => 'Any CPU'
msb.properties[:TargetFrameworkVersion] = TARGET_FRAMEWORK_VERSION unless BUILD_CONFIG_KEY == 'NET35'
msb.use :net4 #MSB_USE
msb.targets :Clean, :Build
msb.solution = 'src/Samples/Distributor/Grid.Distributor.sln'
end
def copyOutputFiles(fromDir, filePattern, outDir)
FileUtils.mkdir_p outDir unless exists?(outDir)
Dir.glob(File.join(fromDir, filePattern)){|file|
copy(file, outDir) if File.file?(file)
}
end
task :tests => [:unit_tests]
desc "Runs unit tests (integration tests?, acceptance-tests?) etc."
nunit :unit_tests => [:compile] do |nunit|
nunit.command = File.join('lib', 'nunit', 'net-2.0', "nunit-console#{(BUILD_PLATFORM.empty? ? '' : "-#{BUILD_PLATFORM}")}.exe")
nunit.options = "/framework=#{CLR_TOOLS_VERSION}", '/nothread', '/nologo', '/labels', "\"/xml=#{File.join(props[:artifacts], 'nunit-test-results.xml')}\""
nunit.assemblies = FileList["tests/MassTransit.Tests.dll"]
end
task :transport_tests => [:msmq_tests, :rabbitmq_tests]
desc "Runs unit tests for MSMQ"
task :msmq_tests do
Dir.mkdir props[:artifacts] unless exists?(props[:artifacts])
runner = NUnitRunner.new(File.join('lib', 'nunit', 'net-2.0', "nunit-console#{(BUILD_PLATFORM.empty? ? '' : "-#{BUILD_PLATFORM}")}.exe"),
'tests',
TARGET_FRAMEWORK_VERSION,
['/nothread', '/nologo', '/labels', "\"/xml=#{File.join(props[:artifacts], 'msmq-test-results.xml')}\""])
runner.run ['MassTransit.Transports.Msmq.Tests'].map{ |assem| "#{assem}.dll" }
end
desc "Runs unit tests for RabbitMQ"
task :rabbitmq_tests do
Dir.mkdir props[:artifacts] unless exists?(props[:artifacts])
runner = NUnitRunner.new(File.join('lib', 'nunit', 'net-2.0', "nunit-console#{(BUILD_PLATFORM.empty? ? '' : "-#{BUILD_PLATFORM}")}.exe"),
'tests',
TARGET_FRAMEWORK_VERSION,
['/nothread', '/nologo', '/labels', "\"/xml=#{File.join(props[:artifacts], 'rabbitmq-test-results.xml')}\""])
runner.run ['MassTransit.Transports.RabbitMQ.Tests'].map{ |assem| "#{assem}.dll" }
end
desc "Target used for the CI server. It both builds, tests and packages."
task :ci => [:default, :package, :moma]
desc "ZIPs up the build results and runs the MoMA analyzer."
zip :package do |zip|
zip.directories_to_zip = [props[:stage]]
zip.output_file = "MassTransit-#{asm_version}.zip"
zip.output_path = [props[:artifacts]]
end
desc "Runs the MoMA mono analyzer on the project files. Start the executable manually without --nogui to update the profiles once in a while though, or you'll always get the same report from the analyzer."
task :moma => [:compile] do
puts "Analyzing project fitness for mono:"
dlls = project_outputs(props).join(' ')
sh "lib/MoMA/MoMA.exe --nogui --out #{File.join(props[:artifacts], 'MoMA-report.html')} #{dlls}"
end
# NUSPEC
# ===================================================
def add_files stage, what_dlls, nuspec
[['net35', 'net-3.5'], ['net40', 'net-4.0']].each{|fw|
takeFrom = File.join(stage, fw[1], what_dlls)
Dir.glob(takeFrom).each do |f|
nuspec.file(f.gsub("/", "\\"), "lib\\#{fw[0]}")
end
}
end
task :all_nuspecs => [:mt_nuspec, :mtsm_nuspec, :mtaf_nuspec, :mtni_nuspec, :mtun_nuspec, :mtcw_nuspec, :mtnhib_nuspec, :mtrmq_nuspec]
directory 'nuspecs'
nuspec :mt_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'MassTransit is a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
# nuspec.title = Projects[:tx][:title]
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "Magnum", "2.0.0.1"
nuspec.dependency "log4net", "1.2.10"
nuspec.output_file = 'nuspecs/MassTransit.nuspec'
add_files props[:stage], 'MassTransit.{dll,pdb,xml}', nuspec
add_files props[:stage], "#{File.join('Transports', 'MSMQ', 'MassTransit.Transports.Msmq.{dll,pdb,xml}')}", nuspec
end
nuspec :mtcw_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.CastleWindsor'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for Castle Windsor to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "Castle.Windsor", "2.5.2"
nuspec.output_file = 'nuspecs/MassTransit.CastleWindsor.nuspec'
add_files props[:stage], "#{File.join('Containers', 'MassTransit.WindsorIntegration.{dll,pdb,xml}')}", nuspec
end
nuspec :mtrmq_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.RabbitMQ'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for RabbitMQ to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "RabbitMQ.Client", "2.5.1"
nuspec.output_file = 'nuspecs/MassTransit.RabbitMQ.nuspec'
add_files props[:stage], "#{File.join('Transports', 'RabbitMQ', 'MassTransit.Transports.RabbitMq.{dll,pdb,xml}')}", nuspec
end
nuspec :mtaf_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.Autofac'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for Autofac to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "Autofac", "2.4.5.724"
nuspec.output_file = 'nuspecs/MassTransit.Autofac.nuspec'
add_files props[:stage], "#{File.join('Containers', 'MassTransit.AutofacIntegration.{dll,pdb,xml}')}", nuspec
end
nuspec :mtnhib_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.NHibernate'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'An integration library for NHibernate support in MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "log4net", "1.2.10"
nuspec.dependency "NHibernate", "3.1.0"
nuspec.dependency "FluentNHibernate", "1.2"
nuspec.dependency "Magnum", "2.0.0.1"
nuspec.output_file = 'nuspecs/MassTransit.NHibernate.nuspec'
add_files props[:stage], "#{File.join('Persistence', 'NHibernate', 'MassTransit.NHibernateIntegration.{dll,pdb,xml}')}", nuspec
end
nuspec :mtni_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.Ninject'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for Ninject to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "Ninject", "2.2.1.4"
nuspec.output_file = 'nuspecs/MassTransit.Ninject.nuspec'
add_files props[:stage], "#{File.join('Containers', 'MassTransit.NinjectIntegration.{dll,pdb,xml}')}", nuspec
end
nuspec :mtsm_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.StructureMap'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for StructureMap to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "StructureMap", "2.6.2"
nuspec.output_file = 'nuspecs/MassTransit.StructureMap.nuspec'
add_files props[:stage], "#{File.join('Containers', 'MassTransit.StructureMapIntegration.{dll,pdb,xml}')}", nuspec
end
nuspec :mtun_nuspec => ['nuspecs'] do |nuspec|
nuspec.id = 'MassTransit.Unity'
nuspec.version = asm_version
nuspec.authors = 'Chris Patterson, Dru Sellers, Travis Smith'
nuspec.description = 'This integration library adds support for Unity to MassTransit, a distributed application framework for .NET, including support for MSMQ and RabbitMQ. Version 2.0 is currently in beta, but the NuGet package is being made available prior to Pre-Release support in NuGet to ease installation.'
nuspec.projectUrl = 'http://masstransit-project.com'
nuspec.language = "en-US"
nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0"
nuspec.requireLicenseAcceptance = "true"
nuspec.dependency "MassTransit", asm_version
nuspec.dependency "Unity", "2.0.0"
nuspec.output_file = 'nuspecs/MassTransit.Unity.nuspec'
add_files props[:stage], "#{File.join('Containers', 'MassTransit.UnityIntegration.{dll,pdb,xml}')}", nuspec
end
# NUGET
# ===================================================
directory 'build_artifacts'
desc "Builds the nuget package"
task :nuget => ['build_artifacts', :all_nuspecs] do
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.StructureMap.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.Autofac.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.Ninject.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.Unity.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.CastleWindsor.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.NHibernate.nuspec -o build_artifacts"
sh "lib/nuget.exe pack -BasePath build_output nuspecs/MassTransit.RabbitMQ.nuspec -o build_artifacts"
end
def project_outputs(props)
props[:projects].map{ |p| "src/#{p}/bin/#{BUILD_CONFIG}/#{p}.dll" }.
concat( props[:projects].map{ |p| "src/#{p}/bin/#{BUILD_CONFIG}/#{p}.exe" } ).
find_all{ |path| exists?(path) }
end