Skip to content

Commit af44ead

Browse files
committed
further build script improvements
1 parent b5dedb7 commit af44ead

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

RakeFile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,10 @@ namespace :source do
7777

7878
puts "The new version is #{info.version}"
7979
end
80-
81-
task :nhibernate_version, :nhibernate_version do |t,args|
82-
args.with_defaults :nhibernate_version => ENV['nhibernate_version'] || NH_VERSION
83-
end
8480

8581
task :choose_build_runner do |cmd, args|
8682
task_name = 'source:' + (Platform.is_nix()? 'x': 'ms') + 'build'
8783

88-
args.with_defaults :nhibernate_version => ('NH' + NH_VERSION.gsub('.', ''))
89-
puts 'Precompiler switch: ' + args[:nhibernate_version]
90-
9184
Rake::Task[task_name].reenable
9285
Rake::Task[task_name].invoke(args)
9386
end
@@ -98,16 +91,17 @@ namespace :source do
9891
xb.verbosity = :minimal
9992
xb.properties = {
10093
:Configuration => "Release",
101-
:DefineConstants => args[:nhibernate_version],
94+
:DefineConstants => 'NH' + NH_VERSION.gsub('.', ''),
10295
:TargetFrameworkVersion => Platform.config['build']['target_framework']
10396
}
10497
end
10598

106-
msbuild :msbuild, [:nhibernate_version] => :nhibernate_version do |msbuild, args|
99+
msbuild :msbuild, [:nhibernate_version] do |msbuild, args|
100+
puts "Build switch #{args}"
107101
msbuild.properties = {
108-
:Configuration => "Release",
109-
:DefineConstants => args[:nhibernate_version],
110-
:WarningLevel => 0
102+
Configuration: :Release,
103+
DefineConstants: 'NH' + NH_VERSION.gsub('.', ''),
104+
WarningLevel: 0
111105
}
112106
msbuild.targets [:Clean, :Build]
113107
msbuild.solution = SLN

0 commit comments

Comments
 (0)