Skip to content

Commit 606f780

Browse files
committed
improvements from 4.0 branch
2 parents b85dbd6 + 354e366 commit 606f780

File tree

5 files changed

+26
-113
lines changed

5 files changed

+26
-113
lines changed

Gemfile.lock

Lines changed: 0 additions & 15 deletions
This file was deleted.

RakeFile

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PROPS = 'src/CommonAssemblyInfo.cs'
77
SLN = 'src/FluentNHibernate.sln'
88
CONFIG = 'config.json'
99
NUSPEC = 'src/FluentNHibernate.nuspec'
10-
CLR_TOOLS_VERSION = "v4.0.30319"
1110

1211
module Platform
1312

@@ -33,16 +32,14 @@ module Platform
3332
JSON.parse(File.read(CONFIG))
3433
end
3534

36-
def self.update_config_version(arg)
37-
current = self.config
38-
current['assembly_info']['version'] = current['nuspec']['version'] = arg
39-
File.write(CONFIG, JSON.pretty_generate(current.to_json))
40-
end
41-
4235
end
4336

4437
NH_VERSION = Platform.config['build']['nh_precompiler_switch']
4538

39+
# Albacore.configure do |config|
40+
# config.log_level = :verbose
41+
# end
42+
4643
def get_version
4744
ENV['BUILD_NUMBER'] || Platform.config['default_version_number']
4845
end
@@ -60,18 +57,17 @@ namespace :ripple do
6057
args = "restore"
6158
sh "#{ripple} #{args}"
6259
end
60+
task :run_ci_build => ['ripple:restore', 'build:all', 'docs:build', 'package:all' ]
6361
end
6462

6563
namespace :source do
6664
desc 'Update assembly info with latest version number'
6765
assemblyinfo :update_version do |info|
6866
info.output_file = PROPS
69-
70-
commit_hash = `git log -1 --format="%H%"`
7167

7268
info.title = Platform.config['assembly_info']['title']
73-
info.version = info.file_version = get_version
74-
info.informational_version = Platform.config['version']
69+
info.version = get_version
70+
info.informational_version = Platform.config['assembly_info']['version']
7571
info.company_name = 'http://fluentnhibernate.org'
7672
info.product_name = 'FluentNHibernate'
7773
info.description = commit_hash[0..(commit_hash.length - 3)]
@@ -109,7 +105,7 @@ namespace :source do
109105
msbuild :msbuild, [:nhibernate_version] => :nhibernate_version do |msbuild, args|
110106
msbuild.properties = {
111107
configuration: :Release,
112-
DefineConstants: args[:nhibernate_version],
108+
DefineConstants: nh_version_precompiler_switch,
113109
WarningLevel: 0
114110
}
115111
msbuild.targets [:Clean, :Build]
@@ -159,12 +155,23 @@ namespace :docs do
159155
end
160156

161157
namespace :git do
158+
desc "Tags the current release"
159+
task :tag, :assembly_info do |asm, args|
160+
args.with_defaults(:assembly_info => Platform.config['assembly_info']['version'])
161+
162+
sh "git tag \"v#{args.version}\""
163+
end
164+
162165
desc "Updates the version and tags the release"
163-
task :prep_release do |task|
164-
current_version = Platform.config['assembly_info']['version']
165-
sh "git add -A"
166-
sh "git commit -m \"Updated version to #{current_version}\""
167-
sh "git tag \"v#{current_version}\""
166+
task :prep_release, :assembly_info do |task, args|
167+
if !args.version.nil?
168+
task(:update_version).invoke(args.version)
169+
170+
sh "git add #{CONFIG} #{NUSPEC}"
171+
sh "git commit -m \"Updated version to #{args.version}\""
172+
173+
task(:tag).invoke(args.version)
174+
end
168175
end
169176
end
170177

@@ -258,7 +265,7 @@ namespace :package do
258265
desc 'Package everything (src, bin, docs, nuget)'
259266
task :all => [:source, :binaries, :docs, :nuget]
260267
end
261-
268+
262269
def update_xml(xml_path)
263270
#Open up the xml file
264271
xml_file = File.new(xml_path)

buildsupport/ripple.rb

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/FluentNHibernate.Specs/FluentNHibernate.Specs.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<AssemblyName>FluentNHibernate.Specs</AssemblyName>
1212
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<MapFileExtensions>true</MapFileExtensions>
1514
</PropertyGroup>
1615
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1716
<DebugSymbols>true</DebugSymbols>

src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,12 @@
5353
<SpecificVersion>False</SpecificVersion>
5454
<HintPath>..\packages\NUnit.2.5.7.10213\lib\nunit.framework.dll</HintPath>
5555
</Reference>
56-
<Reference Include="nunit.mocks, Version=2.5.7.10213, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
57-
<SpecificVersion>False</SpecificVersion>
58-
<HintPath>..\packages\NUnit.2.5.7.10213\lib\nunit.mocks.dll</HintPath>
59-
</Reference>
60-
<Reference Include="pnunit.framework, Version=1.0.3865.21394, Culture=neutral, processorArchitecture=MSIL">
61-
<SpecificVersion>False</SpecificVersion>
62-
<HintPath>..\packages\NUnit.2.5.7.10213\lib\pnunit.framework.dll</HintPath>
63-
</Reference>
6456
<Reference Include="System" />
6557
<Reference Include="System.Core">
6658
<RequiredTargetFramework>3.5</RequiredTargetFramework>
6759
</Reference>
6860
<Reference Include="System.Data.SQLite">
69-
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.DLL</HintPath>
61+
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.dll</HintPath>
7062
</Reference>
7163
<Reference Include="System.Drawing" />
7264
<Reference Include="System.Data" />

0 commit comments

Comments
 (0)