Skip to content

Commit 79d6362

Browse files
authored
Merge branch 'master' into GH-1381
2 parents ecf3e89 + 92de0b7 commit 79d6362

File tree

398 files changed

+11060
-3270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

398 files changed

+11060
-3270
lines changed

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: csharp
2+
mono: latest
3+
dotnet: 2.1.2
4+
sudo: required
5+
services:
6+
- mysql
7+
- postgresql
8+
- docker
9+
env:
10+
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
11+
- DB=PostgreSQL CONNECTION_STRING="Host=localhost;Port=5432;Username=postgres;Database=nhibernate;Enlist=true;"
12+
- DB=Firebird
13+
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
14+
matrix:
15+
allow_failures:
16+
- env: DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
17+
before_install:
18+
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
19+
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
20+
- sudo apt-get update -qq
21+
- sudo apt-get install -y powershell
22+
- |-
23+
if [[ "$DB" == "MySQL" ]]
24+
then
25+
echo -e '[server]\nlower_case_table_names=1' | sudo tee -a /etc/mysql/my.cnf
26+
sudo service mysql restart
27+
fi
28+
- |-
29+
if [[ "$DB" == "Firebird" ]]
30+
then
31+
sudo apt-get install -y libicu-dev libtommath-dev curl
32+
curl -L -O https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.amd64.tar.gz
33+
tar xzvf Firebird-3.0.3.32900-0.amd64.tar.gz
34+
pushd Firebird-3.0.3.32900-0.amd64
35+
sudo ./install.sh -silent
36+
popd
37+
export $(sudo cat /opt/firebird/SYSDBA.password | grep -v ^# | xargs)
38+
sudo chmod 775 /tmp/firebird
39+
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
40+
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
41+
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
42+
sudo service firebird restart
43+
fi
44+
before_script:
45+
- if [[ "$DB" == "SqlServer2008" ]]; then docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress microsoft/mssql-server-linux:latest; fi
46+
- if [[ "$DB" == "PostgreSQL" ]]; then psql -c "CREATE DATABASE nhibernate;" -U postgres; fi
47+
- if [[ "$DB" == "MySQL" ]]; then mysql -e "CREATE DATABASE IF NOT EXISTS nhibernate;"; fi
48+
script:
49+
- pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"$DB\";\"ConnectionString\"=\"$CONNECTION_STRING\"}"

GitReleaseManager.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ issue-labels-include:
55
- "t: New Feature"
66
- "t: Improvement"
77
- "t: Task"
8+
- "t: Tests"
89
issue-labels-exclude:
910
- "r: Duplicate"
1011
- "r: External Issue"
@@ -26,3 +27,6 @@ issue-labels-alias:
2627
- name: "t: Task"
2728
header: Task
2829
plural: Task
30+
- name: "t: Tests"
31+
header: Tests
32+
plural: Tests

ReleaseProcedure.txt

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
11
These are the tasks typically needed to create an official NHibernate release.
22

3-
43
* In GitHub, make sure no open issues have milestone set to the release
5-
that is about to happen (as these will show in the release notes).
6-
7-
* Update releasenotes.txt with list of issues. See if any additions to the
8-
list of "known breaking changes" are necessary.
9-
10-
* Check/update version number in build-common/common.xml.
11-
4+
that is about to happen (as these will show in the milestone).
5+
6+
* Create a draft release in Github with GitReleaseManager. If you have used
7+
the NHibernate build menu, it should be available in Tools\gitreleasemanage.x.x.x\
8+
(change x.x.x by its current version in tools).
9+
By example:
10+
11+
Tools\gitreleasemanager.0.7.0\tools\GitReleaseManager.exe create -o nhibernate -r nhibernate-core -m 5.1 -u username -p password
12+
13+
(Adjust the -m milestone parameter above, and add "-c branchname" if
14+
releasing another branch than master)
15+
16+
* Update releasenotes.txt with the list of issues generated in the GitHub
17+
draft release. Add to the list the release task.
18+
See if any additions to the list of "known breaking changes" are necessary.
19+
20+
* Update the GitHub draft release for matching other release formalism: ensure
21+
its tag matches the released version (three parts: major.minor.release), update
22+
its title, change its description for listing only highlights and breaking
23+
changes, include links to the milestone and the releasenotes of the release
24+
tag, include links to binaries on SourceForge and NuGet.
25+
If the release tag does not match the released version with major.minor.release
26+
formalism, the NuGet package will have an invalid link to release notes.
27+
28+
* Check/update version number in common.xml and NHibernate.props under
29+
build-common folder, in master.xml under doc\reference folder, and in
30+
appveyor.yml in the NHibernate root.
31+
1232
* Don't forget to commit the above.
13-
14-
* Perform the release build including running all tests (GaRelease.bat or
15-
ShowBuildMenu.bat).
16-
17-
NOTE: If you prefer to keep your source code in a path like e.g.:
18-
C:\Users\Something\Long\Projects\nhibernate-core
19-
you may want to issue a command like:
20-
subst P: C:\Users\Something\Long\Projects
21-
And then change to P:\nhibernate-core before building. This will avoid
22-
displaying a long user-specific path in public symbol files.
23-
24-
* If no error or other issue requiring further changes occurred, tag the
25-
current git HEAD with a tag according to version number. Don't forget to
26-
push the tag to github.
27-
33+
34+
* Check the CI release build.
35+
If no error or other issue requiring further changes occurred, merge
36+
the release PR and wait for the resulting commit CI release build.
37+
38+
* Retrieve the artifacts of the CI release build.
39+
2840
* Upload binary and source zip files to SourceForge. Update the "latest
2941
release".
3042

31-
* Update download link on nhibernate.info.
32-
33-
* Push nuget packages including the symbol packages. The nuget packages
34-
should already be available in the build directory, together with a batch
35-
file to push them.
36-
37-
* In GitHub, mark the milestone as released.
38-
43+
* Update download link on nhibernate.info. Update the reference documentation
44+
if needed.
45+
46+
* Push nuget packages including the symbol packages.
47+
48+
* In GitHub, mark the milestone as released and publish the release draft,
49+
creating the release tag by the way. (It should match the tag in the
50+
releasenotes link of the release description.)
51+
3952
* Post release announcement to nhusers, nhibernate-development and as
4053
project news on SourceForge.
41-
54+
4255
* If this was a stable branch, merge it forward to master. Perhaps some
4356
changes need to be edited out in the merge, but this will reduce the
44-
risk of some issue being left unfixed on master.
57+
risk of some issue being left unfixed on master.

Tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ nuget.exe
22
NUnit.*
33
vswhere.*
44
CSharpAsyncGenerator.CommandLine.*
5+
gitreleasemanager.*

Tools/msbuild.cmd

Lines changed: 0 additions & 1 deletion
This file was deleted.

Tools/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
88
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
99
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
10-
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.1" targetFramework="net461" />
10+
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2.1" targetFramework="net461" />
1111
<package id="vswhere" version="2.1.4" targetFramework="net461" />
12+
<package id="gitreleasemanager" version="0.7.0" targetFramework="net461" />
1213
</packages>

appveyor.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: 5.1.1.{build}
2+
image: Visual Studio 2017
3+
environment:
4+
matrix:
5+
- DB: SqlServer2008
6+
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
7+
- DB: PostgreSQL
8+
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
9+
- DB: Firebird
10+
- DB: MySQL
11+
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;
12+
init:
13+
# Required for having windows endlines in sources zip
14+
- git config --global core.autocrlf true
15+
matrix:
16+
allow_failures:
17+
- DB: MySQL
18+
build: off
19+
before_test:
20+
- ps: |-
21+
switch ($env:DB) {
22+
'Firebird' {
23+
$FireBirdPath = 'C:\firebird'
24+
# Install Firebird
25+
New-Item -ItemType Directory -Force $FireBirdPath > $null
26+
Push-Location $FireBirdPath
27+
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0_x64.zip' -OutFile firebird.zip
28+
Unblock-File firebird.zip
29+
7z x firebird.zip
30+
New-Item -ItemType Directory -Force Data
31+
# Declare nhibernate db
32+
Add-Content -Path '.\databases.conf' -Value "`r`nnhibernate = $FireBirdPath\Data\nhibernate.fdb"
33+
# Minimal db settings
34+
Add-Content -Path '.\firebird.conf' -Value "`r`nAuthServer = Srp`r`nAuthClient = Srp`r`nUserManager = Srp`r`nWireCrypt = Enabled"
35+
# Create SYSDBA account
36+
New-Item SYSDBA.sql -Type File
37+
Add-Content -Path '.\SYSDBA.sql' -Value "CREATE USER SYSDBA PASSWORD 'masterkey';`r`nCOMMIT;`r`nQUIT;"
38+
.\isql -user sysdba employee -input SYSDBA.sql
39+
# Start Firebird
40+
.\firebird.exe -a
41+
Pop-Location
42+
}
43+
'MySQL' {
44+
Start-Service 'MySQL57'
45+
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
46+
$env:MYSQL_PWD = 'Password12!'
47+
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate;' --user=root
48+
}
49+
'Odbc' { Start-Service 'MSSQL$SQL2017' }
50+
'PostgreSQL' {
51+
# Enable prepared transactions
52+
Add-Content -Path 'C:\Program Files\PostgreSQL\10\data\postgresql.conf' -Value "`r`nmax_prepared_transactions = 100"
53+
Start-Service 'postgresql-x64-10'
54+
}
55+
'SqlServer2008' { Start-Service 'MSSQL$SQL2017' }
56+
'SqlServer2012' { Start-Service 'MSSQL$SQL2017' }
57+
}
58+
test_script:
59+
- cmd: powershell -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"%DB%\";\"ConnectionString\"=\"%CONNECTION_STRING%\"}"
60+
deploy: off
61+
on_finish:
62+
- ps: |-
63+
$wc = New-Object 'System.Net.WebClient'
64+
Get-Item '*-TestResult.xml' | ForEach-Object {
65+
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", $_)
66+
}

build-common/DotNetSdkMono.props

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
The MIT License (MIT)
4+
5+
Copyright (c) Microsoft Corporation.
6+
All rights reserved.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
25+
-->
26+
<!-- Copied from here: https://github.com/Microsoft/visualfsharp/blob/cb9e692331c2f0d66b0f72d49a07533204011517/fcs/netfx.props -->
27+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
28+
<PropertyGroup>
29+
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
30+
<!-- have to teach MSBuild where the Mono copy of the reference assemblies is -->
31+
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
32+
33+
<!-- Look in the standard install locations -->
34+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
35+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
36+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
37+
38+
<!-- If we found Mono reference assemblies, then use them -->
39+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
40+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
41+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
42+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
43+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
44+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
45+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
46+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
47+
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
48+
49+
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
50+
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
51+
</PropertyGroup>
52+
</Project>

build-common/NHibernate.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project>
2+
<Import Project="DotNetSdkMono.props" />
23
<PropertyGroup>
34
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
4-
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
5-
<VersionPatch Condition="'$(VersionPatch)' == ''">3</VersionPatch>
5+
<VersionMinor Condition="'$(VersionMinor)' == ''">1</VersionMinor>
6+
<VersionPatch Condition="'$(VersionPatch)' == ''">1</VersionPatch>
67
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
78

89
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
@@ -19,10 +20,13 @@
1920
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/logo/NHibernate-NuGet.png</PackageIconUrl>
2021
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2122
<PackageLicenseUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/LICENSE.txt</PackageLicenseUrl>
23+
<PackageReleaseNotes>https://github.com/nhibernate/nhibernate-core/blob/$(VersionPrefix)/releasenotes.txt</PackageReleaseNotes>
2224
<RepositoryUrl>https://github.com/nhibernate/nhibernate-core.git</RepositoryUrl>
2325
<RepositoryType>git</RepositoryType>
2426

2527
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
2628
<TreatSpecificWarningsAsErrors />
29+
30+
<DisableImplicitPackageTargetFallback>True</DisableImplicitPackageTargetFallback>
2731
</PropertyGroup>
2832
</Project>

0 commit comments

Comments
 (0)