From 671bc3fcc36530ceceb0e7f57ba2168797abe0f5 Mon Sep 17 00:00:00 2001 From: Chermennov Gleb Date: Sun, 31 Aug 2014 15:30:15 +0400 Subject: [PATCH] brought back Sqlite configuration for tests --- .gitignore | 19 +++--- RakeFile | 64 +++++++++++-------- src/CommonAssemblyInfo.cs | 2 + .../app.config | 9 +++ src/FluentNHibernate.Testing/App.config | 15 ++++- .../FluentNHibernate.Testing.csproj | 1 - src/FluentNHibernate.nuspec | 2 +- 7 files changed, 72 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index e02484a00..4cdb22eef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,10 @@ **/*.suo **/*.user **/*.sln* -bin -obj _ReSharper* -dist -output -build *.DotSettings.user *.csproj.user -src/packages - *.resharper.user *.resharper @@ -24,6 +17,12 @@ src/packages *.swp TestResult.xml -TestResult.xml -build/ -*.nupkg \ No newline at end of file +src/packages +bin +obj +dist +output +build +*.nupkg +logs/ +src/CommonAssemblyInfo.cs \ No newline at end of file diff --git a/RakeFile b/RakeFile index 437838df1..730bc9add 100644 --- a/RakeFile +++ b/RakeFile @@ -1,9 +1,12 @@ require 'fileutils' require 'albacore' -require './tools/albacore/nuspec_patch' NH_VERSION = '4.x' +# Albacore.configure do |config| + # config.log_level = :verbose +# end + module Platform def self.is_nix @@ -30,7 +33,7 @@ def get_version ENV['BUILD_NUMBER'] || '1.4.0.0' end -task :default => ['ripple', 'build:all'] +task :default => ['ripple:update', 'source:update_version', 'build:all'] namespace :ci do task :run_ci_build => [ @@ -40,24 +43,30 @@ namespace :ci do ] end -task :ripple do - ripple = Platform.runtime("buildsupport/ripple.exe") - args = "restore" - sh "#{ripple} #{args}" +namespace :ripple do + desc 'Restores NuGet package binaries' + task :update do |cmd| + ripple = Platform.runtime("buildsupport/ripple.exe") + args = "restore" + sh "#{ripple} #{args}" + end end namespace :source do desc 'Update assembly info with latest version number' - assemblyinfo :update_version do |asm| - asm.output_file = 'src/CommonAssemblyInfo.cs' + assemblyinfo :update_version do |info| + info.output_file = 'src/CommonAssemblyInfo.cs' + + commit_hash = `git log -1 --format="%H%"` - asm.version = get_version - asm.company_name = 'http://fluentnhibernate.org' - asm.product_name = 'FluentNHibernate' - asm.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved." - asm.namespaces = ['System.Security'] + info.version = info.file_version = get_version + info.company_name = 'http://fluentnhibernate.org' + 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'] - puts "The build number is #{asm.version}" + puts "The new build number is #{info.version}" end task :nhibernate_version, :nhibernate_version do |t,args| @@ -70,15 +79,17 @@ namespace :source do nh_version_precompiler_switch = 'NH' + args.nhibernate_version.gsub('.', '') - puts nh_version_precompiler_switch + puts 'Precompiler switch: ' + nh_version_precompiler_switch msb.properties = { configuration: :Release, DefineConstants: nh_version_precompiler_switch, - WarningLevel: 0, + WarningLevel: 0 } msb.targets [:Clean, :Build] msb.solution = 'src/FluentNHibernate.sln' + msb.verbosity = :minimal + msb.parameters = ["/p:TargetFrameworkVersion=v4.0"] end end @@ -96,6 +107,7 @@ namespace :specs do nunit :nunit do |nunit| nunit.command = 'src/packages/NUnit.2.5.7.10213/Tools/nunit-console-x86.exe' nunit.assemblies 'src/FluentNHibernate.Testing/bin/Release/FluentNHibernate.Testing.dll' + nunit.parameters = [ "/framework:net-4.0" ] end end @@ -158,7 +170,7 @@ namespace :package do zip.output_path = 'dist' end - nuspec do |nu| + nuspec do |nu| nu.id = 'FluentNHibernate' nu.version = get_version() nu.authors = 'James Gregory and contributors' @@ -167,23 +179,25 @@ namespace :package do nu.language = 'en-US' nu.licenseUrl = 'http://github.com/jagregory/fluent-nhibernate/raw/master/LICENSE.txt' nu.projectUrl = 'http://fluentnhibernate.org' - nu.dependency 'NHibernate', '[3.3.1.4000,4.0)' - nu.working_directory = 'build' + nu.dependency 'NHibernate', '4.0' + nu.working_directory = Dir.pwd nu.output_file = 'fluentnhibernate.nuspec' - nu.file 'FluentNHibernate.dll', 'lib' - nu.file 'FluentNHibernate.xml', 'lib' + nu.file 'FluentNHibernate.dll', 'lib/net40' + nu.file 'FluentNHibernate.pdb', 'lib/net40' + nu.file 'FluentNHibernate.xml', 'lib/net40' nu.tags = 'orm dal nhibernate conventions' + nu.pretty_formatting = true end - + nugetpack do |nu| nu.command = 'tools/nuget/NuGet.exe' - nu.nuspec = 'build/fluentnhibernate.nuspec' - nu.base_folder = 'build' + nu.nuspec = 'src/FluentNHibernate.nuspec' + nu.base_folder = 'Release' nu.output = 'dist' end desc 'Create nuget spec and package' - task :nuget => [:nuspec, :nugetpack] + task :nuget => [:nugetpack] desc 'Package everything (src, bin, docs, nuget)' task :all => [:source, :binaries, :docs, :nuget] diff --git a/src/CommonAssemblyInfo.cs b/src/CommonAssemblyInfo.cs index 308105b92..fcbe194e1 100644 --- a/src/CommonAssemblyInfo.cs +++ b/src/CommonAssemblyInfo.cs @@ -1,7 +1,9 @@ using System.Security; using System.Reflection; using System.Runtime.InteropServices; +[assembly: AssemblyDescription("c336bcfedf38354c0e4d02a87a80bf2acb549b42")] [assembly: AssemblyCompany("http://fluentnhibernate.org")] [assembly: AssemblyProduct("FluentNHibernate")] [assembly: AssemblyCopyright("Copyright 2008-2014 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.")] [assembly: AssemblyVersion("1.4.0.0")] +[assembly: AssemblyFileVersion("1.4.0.0")] diff --git a/src/Examples.FirstAutomappedProject/app.config b/src/Examples.FirstAutomappedProject/app.config index d113e48a5..c4822d2f9 100644 --- a/src/Examples.FirstAutomappedProject/app.config +++ b/src/Examples.FirstAutomappedProject/app.config @@ -1,5 +1,14 @@ + + + + + + + + + diff --git a/src/FluentNHibernate.Testing/App.config b/src/FluentNHibernate.Testing/App.config index 9a49eedb0..e53694f3d 100644 --- a/src/FluentNHibernate.Testing/App.config +++ b/src/FluentNHibernate.Testing/App.config @@ -1,11 +1,20 @@  + + + + + - - - + + + + + + + \ No newline at end of file diff --git a/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj index 23b5741a1..0af158e86 100644 --- a/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj +++ b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj @@ -392,7 +392,6 @@ - diff --git a/src/FluentNHibernate.nuspec b/src/FluentNHibernate.nuspec index f247e8cdf..accb4e568 100644 --- a/src/FluentNHibernate.nuspec +++ b/src/FluentNHibernate.nuspec @@ -8,7 +8,7 @@ http://github.com/jagregory/fluent-nhibernate/blob/master/LICENSE.txt http://github.com/jagregory/fluent-nhibernate/ - + false Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate.