Skip to content

Commit 452fe6d

Browse files
committed
update to NH 3.4.0.4000 - all tests pass; rake task to apply NH package version across all packages.config and project files in solution
1 parent af44ead commit 452fe6d

File tree

15 files changed

+77
-48
lines changed

15 files changed

+77
-48
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ output
2626
build
2727
*.nupkg
2828
logs/
29-
src/CommonAssemblyInfo.cs
29+
src/CommonAssemblyInfo.cs
30+
src/FluentNHibernate.nuspec

RakeFile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ namespace :ci do
5050
task :run_ci_build => [ 'ripple:restore', 'build:all', 'docs:build', 'package:all' ]
5151
end
5252

53+
54+
5355
namespace :ripple do
5456
desc 'Restores NuGet package binaries'
5557
task :restore do |cmd|
@@ -231,6 +233,31 @@ namespace :package do
231233
end
232234
end
233235

236+
task :upgradeNhVersion, :version do |cmd, args|
237+
fail "Please provide version number to work with" if not args.has_key?(:version)
238+
puts "Updating NH version to #{args[:version]}"
239+
puts "Editing packages.config files..."
240+
packages_configs = Rake::FileList['**/packages.config']
241+
packages_configs.each do |pc|
242+
update_xml pc do |xml|
243+
xml.root.elements["package[@id='NHibernate']"].attributes['version'] = args[:version]
244+
end
245+
puts "Upgraded #{pc}"
246+
end
247+
248+
puts "Editing .csproj files..."
249+
project_files = Rake::FileList['**/*.csproj']
250+
project_files.each do |pf|
251+
update_xml pf do |xml|
252+
old_value = xml.root.elements["ItemGroup[1]/Reference[contains(@Include, 'NHibernate')]/HintPath"].text
253+
new_value = old_value.gsub(/(\d+).(\d+).(\d+).(\d+)/, args[:version])
254+
xml.root.elements["ItemGroup[1]/Reference[contains(@Include, 'NHibernate')]/HintPath"].text = new_value
255+
end
256+
puts "Upgraded #{pf}"
257+
end
258+
puts "Done."
259+
end
260+
234261
nugetpack :nupack do |nu|
235262
nu.command = 'tools/nuget/NuGet.exe'
236263
nu.nuspec = NUSPEC
@@ -265,6 +292,7 @@ def update_xml(xml_path)
265292
#Open up the xml file
266293
xml_file = File.new(xml_path)
267294
xml = REXML::Document.new xml_file
295+
xml.context[:attribute_quote] = :quote
268296

269297
#Allow caller to make the changes
270298
yield xml

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"default_version_number": "1.5.1.0",
44
"assembly_info":
55
{
6-
"version": "1.5.1-alpha",
6+
"version": "1.5.1.0",
77
"title": "Fluent NHibernate for .NET 3.5"
88
},
99
"build":
@@ -19,7 +19,7 @@
1919
"nuspec":
2020
{
2121
"id": "FluentNHibernate.Net35",
22-
"version": "1.5.1-alpha",
22+
"version": "1.5.1.0",
2323
"title": "FluentNHibernate for .NET 3.5",
2424
"nhibernate_version_interval": "[3.3.1.4000,4.0)",
2525
"binaries_folder": "net35"

src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -13,7 +13,7 @@
1313
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<StartupObject>Examples.FirstAutomappedProject.Program</StartupObject>
16-
<FileUpgradeFlags></FileUpgradeFlags>
16+
<FileUpgradeFlags />
1717
<OldToolsVersion>3.5</OldToolsVersion>
1818
<UpgradeBackupLocation />
1919
<PublishUrl>publish\</PublishUrl>
@@ -72,7 +72,7 @@
7272
</PropertyGroup>
7373
<ItemGroup>
7474
<Reference Include="NHibernate">
75-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
75+
<HintPath>..\packages\NHibernate.3.4.0.4000\lib\Net35\NHibernate.dll</HintPath>
7676
</Reference>
7777
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
7878
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version='1.0' encoding='UTF-8'?>
22
<packages>
3-
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net35" allowedVersions="[3,4)"/>
4-
<package id="NHibernate" version="3.3.3.4001" targetFramework="net35" allowedVersions="[3,4)"/>
5-
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net35" />
3+
<package allowedVersions="[3,4)" id="Iesi.Collections" targetFramework="net35" version="3.2.0.4000" />
4+
<package allowedVersions="[3,4)" id="NHibernate" targetFramework="net35" version="3.4.0.4000" />
5+
<package id="System.Data.SQLite" targetFramework="net35" version="1.0.66.1" />
66
</packages>

src/Examples.FirstProject/Examples.FirstProject.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -13,7 +13,7 @@
1313
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<StartupObject>Examples.FirstProject.Program</StartupObject>
16-
<FileUpgradeFlags></FileUpgradeFlags>
16+
<FileUpgradeFlags />
1717
<OldToolsVersion>3.5</OldToolsVersion>
1818
<UpgradeBackupLocation />
1919
<PublishUrl>publish\</PublishUrl>
@@ -72,7 +72,7 @@
7272
</PropertyGroup>
7373
<ItemGroup>
7474
<Reference Include="NHibernate">
75-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
75+
<HintPath>..\packages\NHibernate.3.4.0.4000\lib\Net35\NHibernate.dll</HintPath>
7676
</Reference>
7777
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
7878
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version='1.0' encoding='UTF-8'?>
22
<packages>
3-
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net35" allowedVersions="[3,4)"/>
4-
<package id="NHibernate" version="3.3.3.4001" targetFramework="net35" allowedVersions="[3,4)"/>
5-
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net35" />
3+
<package allowedVersions="[3,4)" id="Iesi.Collections" targetFramework="net35" version="3.2.0.4000" />
4+
<package allowedVersions="[3,4)" id="NHibernate" targetFramework="net35" version="3.4.0.4000" />
5+
<package id="System.Data.SQLite" targetFramework="net35" version="1.0.66.1" />
66
</packages>

src/FluentNHibernate.Specs.ExternalFixtures/FluentNHibernate.Specs.ExternalFixtures.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -37,7 +37,7 @@
3737
</Reference>
3838
<Reference Include="NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
3939
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
40+
<HintPath>..\packages\NHibernate.3.4.0.4000\lib\Net35\NHibernate.dll</HintPath>
4141
</Reference>
4242
<Reference Include="System" />
4343
<Reference Include="System.Core" />
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version='1.0' encoding='UTF-8'?>
22
<packages>
3-
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net35" allowedVersions="[3,4)"/>
4-
<package id="NHibernate" version="3.3.3.4001" targetFramework="net35" allowedVersions="[3,4)"/>
3+
<package allowedVersions="[3,4)" id="Iesi.Collections" targetFramework="net35" version="3.2.0.4000" />
4+
<package allowedVersions="[3,4)" id="NHibernate" targetFramework="net35" version="3.4.0.4000" />
55
</packages>

src/FluentNHibernate.Specs/FluentNHibernate.Specs.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -43,7 +43,7 @@
4343
</Reference>
4444
<Reference Include="NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
4545
<SpecificVersion>False</SpecificVersion>
46-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
46+
<HintPath>..\packages\NHibernate.3.4.0.4000\lib\Net35\NHibernate.dll</HintPath>
4747
</Reference>
4848
<Reference Include="System" />
4949
<Reference Include="System.Core">

0 commit comments

Comments
 (0)