Skip to content

Commit

Permalink
Merge pull request #326 from chester89/v2.0.2
Browse files Browse the repository at this point in the history
version 2.0.2
  • Loading branch information
chester89 committed Oct 5, 2015
2 parents 6302b20 + aea486a commit 0ac6335
Show file tree
Hide file tree
Showing 69 changed files with 562 additions and 4,840 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ build
*.nupkg
logs/
src/CommonAssemblyInfo.cs
src/FluentNHibernate.nuspec
1 change: 0 additions & 1 deletion Build.bat

This file was deleted.

Empty file removed MIRROR
Empty file.
37 changes: 34 additions & 3 deletions RakeFile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ namespace :source do
info.product_name = 'FluentNHibernate'
info.description = commit_hash[0..(commit_hash.length - 3)]
info.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved."
info.namespaces = ['System.Security']
info.namespaces = ['System', 'System.Security', 'System.Runtime.CompilerServices']

info.custom_attributes = {
:CLSCompliant => true,
:InternalsVisibleTo => "FluentNHibernate.Testing"
}

puts "The new version is #{info.version}"
end
Expand All @@ -94,7 +99,7 @@ namespace :source do
DefineConstants: nh_version_precompiler_switch,
WarningLevel: 0
}
msbuild.targets [:Clean, :Build]
msbuild.targets [:Build]
msbuild.solution = SLN
msbuild.verbosity = :minimal
msbuild.parameters = ["/p:TargetFrameworkVersion=#{Platform.config['build']['msbuild_runtime']}"]
Expand Down Expand Up @@ -222,6 +227,31 @@ namespace :package do
end
end

task :upgradeNhVersion, :version do |cmd, args|
fail "Please provide version number to work with" if not args.has_key?(:version)
puts "Updating NH version to #{args[:version]}"
puts "Editing packages.config files..."
packages_configs = Rake::FileList['**/packages.config']
packages_configs.each do |pc|
update_xml pc do |xml|
xml.root.elements["package[@id='NHibernate']"].attributes['version'] = args[:version]
end
puts "Upgraded #{pc}"
end

puts "Editing .csproj files..."
project_files = Rake::FileList['**/*.csproj']
project_files.each do |pf|
update_xml pf do |xml|
old_value = xml.root.elements["ItemGroup[1]/Reference[contains(@Include, 'NHibernate')]/HintPath"].text
new_value = old_value.gsub(/(\d+).(\d+).(\d+).(\d+)/, args[:version])
xml.root.elements["ItemGroup[1]/Reference[contains(@Include, 'NHibernate')]/HintPath"].text = new_value
end
puts "Upgraded #{pf}"
end
puts "Done."
end

nugetpack :nupack do |nu|
nu.command = 'tools/nuget/NuGet.exe'
nu.nuspec = NUSPEC
Expand All @@ -240,6 +270,7 @@ def update_xml(xml_path)
#Open up the xml file
xml_file = File.new(xml_path)
xml = REXML::Document.new xml_file
xml.context[:attribute_quote] = :quote

#Allow caller to make the changes
yield xml
Expand All @@ -257,4 +288,4 @@ task :sln do
Thread.new do
system "devenv #{SLN}"
end
end
end
121 changes: 0 additions & 121 deletions buildsupport/BuildUtils.rb

This file was deleted.

Binary file removed buildsupport/ILMerge.exe
Binary file not shown.
38 changes: 0 additions & 38 deletions buildsupport/ILRepack.rb

This file was deleted.

5 changes: 0 additions & 5 deletions buildsupport/RakeFile

This file was deleted.

30 changes: 0 additions & 30 deletions buildsupport/Ruby_Not_Installed.txt

This file was deleted.

15 changes: 0 additions & 15 deletions buildsupport/common.rb

This file was deleted.

Loading

0 comments on commit 0ac6335

Please sign in to comment.