Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
brought back Sqlite configuration for tests
  • Loading branch information
chester89 committed Aug 31, 2014
1 parent c336bcf commit 671bc3f
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 40 deletions.
19 changes: 9 additions & 10 deletions .gitignore
@@ -1,17 +1,10 @@
**/*.suo
**/*.user
**/*.sln*
bin
obj
_ReSharper*
dist
output
build

*.DotSettings.user
*.csproj.user
src/packages

*.resharper.user
*.resharper

Expand All @@ -24,6 +17,12 @@ src/packages
*.swp
TestResult.xml

TestResult.xml
build/
*.nupkg
src/packages
bin
obj
dist
output
build
*.nupkg
logs/
src/CommonAssemblyInfo.cs
64 changes: 39 additions & 25 deletions 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
Expand All @@ -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 => [
Expand All @@ -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|
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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'
Expand All @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions 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")]
9 changes: 9 additions & 0 deletions src/Examples.FirstAutomappedProject/app.config
@@ -1,5 +1,14 @@
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
Expand Down
15 changes: 12 additions & 3 deletions src/FluentNHibernate.Testing/App.config
@@ -1,11 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727"></supportedRuntime>
</startup>
<appSettings>
<add key="connectionString" value="a-connection-string"/>
</appSettings>
<connectionStrings>
<add name="main" connectionString="connection string"/>
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
</configuration>
Expand Up @@ -392,7 +392,6 @@
<Compile Include="Utils\ReflectionHelperTests.cs" />
<Compile Include="Testing\XmlWriterTestHelper.cs" />
<Compile Include="Utils\TypeReferenceEqualityTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Visitors\ComponentColumnPrefixVisitorSpecs.cs" />
<Compile Include="Visitors\ComponentReferenceResolutionVisitorSpecs.cs" />
<Compile Include="Xml\MappingXmlTestHelper.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/FluentNHibernate.nuspec
Expand Up @@ -8,7 +8,7 @@
<licenseUrl>http://github.com/jagregory/fluent-nhibernate/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>http://github.com/jagregory/fluent-nhibernate/</projectUrl>
<dependencies>
<dependency id="NHibernate" version="[4,)" />
<dependency id="NHibernate" version="4.0" />
</dependencies>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate.</description>
Expand Down

0 comments on commit 671bc3f

Please sign in to comment.