Skip to content

Commit 93898d4

Browse files
authored
Merge pull request #36 from serilog/dev
4.0 (Serilog 2.0) Release
2 parents 303d826 + 78773ad commit 93898d4

15 files changed

+1474
-222
lines changed

Build.ps1

Lines changed: 32 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,51 @@
1-
param(
2-
[String] $majorMinor = "0.0", # 2.0
3-
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION
4-
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll
5-
[Switch] $notouch,
6-
[String] $sln # e.g serilog-sink-name
7-
)
8-
9-
function Set-AssemblyVersions($informational, $assembly)
10-
{
11-
(Get-Content assets/CommonAssemblyInfo.cs) |
12-
ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } |
13-
ForEach-Object { $_ -replace """1.0.0""", """$informational""" } |
14-
ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } |
15-
Set-Content assets/CommonAssemblyInfo.cs
16-
}
1+
echo "build: Build started"
172

18-
function Install-NuGetPackages($solution)
19-
{
20-
nuget restore $solution
21-
}
3+
Push-Location $PSScriptRoot
224

23-
function Invoke-MSBuild($solution, $customLogger)
24-
{
25-
if ($customLogger)
26-
{
27-
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger"
28-
}
29-
else
30-
{
31-
msbuild "$solution" /verbosity:minimal /p:Configuration=Release
32-
}
5+
if(Test-Path .\artifacts) {
6+
echo "build: Cleaning .\artifacts"
7+
Remove-Item .\artifacts -Force -Recurse
338
}
349

35-
function Invoke-NuGetPackProj($csproj)
36-
{
37-
nuget pack -Prop Configuration=Release -Symbols $csproj
38-
}
10+
& dotnet restore --no-cache
3911

40-
function Invoke-NuGetPackSpec($nuspec, $version)
41-
{
42-
nuget pack $nuspec -Version $version -OutputDirectory ..\..\
43-
}
12+
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
13+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
14+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
4415

45-
function Invoke-NuGetPack($version)
46-
{
47-
ls src/**/*.csproj |
48-
Where-Object { -not ($_.Name -like "*net40*") } |
49-
ForEach-Object { Invoke-NuGetPackProj $_ }
50-
}
16+
echo "build: Version suffix is $suffix"
17+
18+
foreach ($src in ls src/*) {
19+
Push-Location $src
5120

52-
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln)
53-
{
54-
$package="$majorMinor.$patch"
55-
$slnfile = "$sln.sln"
21+
echo "build: Packaging project in $src"
5622

57-
Write-Output "$sln $package"
23+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
24+
if($LASTEXITCODE -ne 0) { exit 1 }
5825

59-
if (-not $notouch)
60-
{
61-
$assembly = "$majorMinor.0.0"
26+
Pop-Location
27+
}
6228

63-
Write-Output "Assembly version will be set to $assembly"
64-
Set-AssemblyVersions $package $assembly
65-
}
29+
foreach ($test in ls test/*.PerformanceTests) {
30+
Push-Location $test
6631

67-
Install-NuGetPackages $slnfile
32+
echo "build: Building performance test project in $test"
6833

69-
Invoke-MSBuild $slnfile $customLogger
34+
& dotnet build -c Release
35+
if($LASTEXITCODE -ne 0) { exit 2 }
7036

71-
Invoke-NuGetPack $package
37+
Pop-Location
7238
}
7339

74-
$ErrorActionPreference = "Stop"
40+
foreach ($test in ls test/*.Tests) {
41+
Push-Location $test
42+
43+
echo "build: Testing project in $test"
7544

76-
if (-not $sln)
77-
{
78-
$slnfull = ls *.sln |
79-
Where-Object { -not ($_.Name -like "*net40*") } |
80-
Select -first 1
45+
& dotnet test -c Release
46+
if($LASTEXITCODE -ne 0) { exit 3 }
8147

82-
$sln = $slnfull.BaseName
48+
Pop-Location
8349
}
8450

85-
Invoke-Build $majorMinor $patch $customLogger $notouch $sln
51+
Pop-Location

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
4.0.0
2+
* Serilog 2.0
3+
* [Documentation fix](https://github.com/serilog/serilog-sinks-mssqlserver/pull/32)
4+
15
2.0.33
26
* Option added to exclude redundant properties from serialized JSON in column LogEvent. (https://github.com/serilog/serilog-sinks-mssqlserver/pull/27)
37

appveyor.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
version: "{build}"
2-
configuration: Debug
1+
version: '{build}'
2+
skip_tags: true
3+
image: Visual Studio 2015
4+
configuration: Release
5+
install:
6+
- ps: mkdir -Force ".\build\" | Out-Null
7+
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9+
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
311
build_script:
4-
- ps: ./Build.ps1 -majorMinor "4.0" -patch "0-beta-$env:APPVEYOR_BUILD_VERSION" -customLogger "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
12+
- ps: ./Build.ps1
13+
test: off
514
artifacts:
6-
- path: Serilog.Sinks.MSSqlServer.*.nupkg
15+
- path: artifacts/Serilog.*.nupkg
716
deploy:
817
- provider: NuGet
918
api_key:
1019
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
1120
skip_symbols: true
1221
on:
13-
branch: dev
14-
assembly_info:
15-
patch: true
16-
file: AssemblyInfo.*
17-
assembly_version: "{build}"
18-
assembly_file_version: "{build}"
19-
assembly_informational_version: "4.0.0-beta-{build}"
22+
branch: /^(master|dev)$/
23+
- provider: GitHub
24+
auth_token:
25+
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
26+
artifact: /Serilog.*\.nupkg/
27+
tag: v$(appveyor_build_version)
28+
on:
29+
branch: master

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-preview2-003121"
5+
}
6+
}

serilog-sinks-mssqlserver.sln

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.MSSqlServer", "src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.csproj", "{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04226074-C72F-42BC-AB02-4D70A7BAE7E1}"
7+
EndProject
8+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.MSSqlServer", "src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.xproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F02D6513-6F45-452E-85A0-41A872A2C1F8}"
11+
EndProject
12+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.MSSqlServer.Tests", "test\Serilog.Sinks.MSSqlServer.Tests\Serilog.Sinks.MSSqlServer.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
13+
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{70667ADA-A2FD-4821-A6A1-8D18D0D71507}"
15+
ProjectSection(SolutionItems) = preProject
16+
appveyor.yml = appveyor.yml
17+
Build.ps1 = Build.ps1
18+
CHANGES.md = CHANGES.md
19+
global.json = global.json
20+
README.md = README.md
21+
EndProjectSection
722
EndProject
823
Global
924
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1025
Debug|Any CPU = Debug|Any CPU
1126
Release|Any CPU = Release|Any CPU
1227
EndGlobalSection
1328
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.Build.0 = Release|Any CPU
1837
EndGlobalSection
1938
GlobalSection(SolutionProperties) = preSolution
2039
HideSolutionNode = FALSE
2140
EndGlobalSection
41+
GlobalSection(NestedProjects) = preSolution
42+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {04226074-C72F-42BC-AB02-4D70A7BAE7E1}
43+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {F02D6513-6F45-452E-85A0-41A872A2C1F8}
44+
EndGlobalSection
2245
EndGlobal

src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj

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

src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.nuspec

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>803cd13a-d54b-4cec-a55f-e22ae3d93b3c</ProjectGuid>
10+
<RootNamespace>Serilog</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> </PropertyGroup>
13+
<PropertyGroup>
14+
<SchemaVersion>2.0</SchemaVersion>
15+
</PropertyGroup>
16+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
17+
</Project>

src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/StandardColumn.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public enum StandardColumn
3131
Exception,
3232

3333
/// <summary>
34-
/// Properties associated with the event, including those presented in MessageTemplate/>.
34+
/// Properties associated with the event, including those presented in <see cref="MessageTemplate"/>.
3535
/// </summary>
3636
Properties,
3737

@@ -40,4 +40,4 @@ public enum StandardColumn
4040
/// </summary>
4141
LogEvent
4242
}
43-
}
43+
}

0 commit comments

Comments
 (0)