@@ -85,9 +85,21 @@ namespace :source do
85
85
args.with_defaults :nhibernate_version => ENV['nhibernate_version'] || NH_VERSION
86
86
end
87
87
88
- desc 'Compile the source'
89
- msbuild :compile, [:nhibernate_version] => :nhibernate_version do |msbuild, args|
90
- args.with_defaults :nhibernate_version => ENV['nhibernate_version'] || NH_VERSION
88
+ task :choose_build_runner do |cmd, args|
89
+ task_name = 'source:' + (Platform.is_nix? 'ms': 'x') + 'build'
90
+
91
+ Rake::Task[task_name].reenable
92
+ Rake::Task[task_name].invoke(args)
93
+ end
94
+
95
+ xbuild :xbuild do |xb|
96
+ xb.solution = SLN
97
+ xb.targets = [:Clean, :Build]
98
+ xb.properties = {:Configuration => "Release"}
99
+ end
100
+
101
+ msbuild :msbuild, [:nhibernate_version] => :nhibernate_version do |msbuild, args|
102
+ args.with_defaults :nhibernate_version => NH_VERSION
91
103
92
104
nh_version_precompiler_switch = 'NH' + args.nhibernate_version.gsub('.', '')
93
105
125
137
126
138
namespace :build do
127
139
desc 'Run full build including tests'
128
- task :all => ['source:update_version', 'source:compile ', 'specs:all'] do
140
+ task :all => ['source:update_version', 'source:choose_build_runner ', 'specs:all'] do
129
141
puts 'Copying output to build directory'
130
142
Dir.mkdir 'build' unless File.exist? 'build'
131
143
Dir.glob 'src/FluentNHibernate/bin/Release/*.{dll,pdb,xml}' do |path|
0 commit comments