Skip to content

Commit f17b0b6

Browse files
authored
Merge pull request #3 from serilog/dev
2.0 release changes and new build script
2 parents 520bc03 + f04b032 commit f17b0b6

File tree

10 files changed

+127
-20
lines changed

10 files changed

+127
-20
lines changed

Build.ps1

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@ Push-Location $PSScriptRoot
22

33
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
44

5-
& dotnet restore
5+
& dotnet restore --no-cache
66

7-
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
7+
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
8+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
9+
$suffix = @{ $true = ""; $false = "$branch-$revision"}[$branch -eq "master" -and $revision -ne "local"]
810

9-
Push-Location src/Serilog.Sinks.Trace
11+
foreach ($src in ls src/Serilog.*) {
12+
Push-Location $src
1013

11-
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$revision
12-
if($LASTEXITCODE -ne 0) { exit 1 }
14+
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$suffix
15+
if($LASTEXITCODE -ne 0) { exit 1 }
16+
17+
Pop-Location
18+
}
19+
20+
foreach ($test in ls test/Serilog.*.Tests) {
21+
Push-Location $test
22+
23+
& dotnet test -c Release
24+
if($LASTEXITCODE -ne 0) { exit 2 }
25+
26+
Pop-Location
27+
}
1328

1429
Pop-Location
15-
Pop-Location

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ The diagnostic trace sink for Serilog.
44

55
[![Build status](https://ci.appveyor.com/api/projects/status/v1oe03lx3wymyy7j/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-trace/branch/master) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.Trace.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.Trace/)
66

7+
Writes log events to the `System.Diagnostics.Trace`.
8+
9+
```csharp
10+
var log = new LoggerConfiguration()
11+
.WriteTo.Trace()
12+
.CreateLogger();
13+
```
14+
715
* [Documentation](https://github.com/serilog/serilog/wiki)
816

917
Copyright © 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).

Serilog.Sinks.Trace.sln

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}"
77
EndProject
@@ -16,6 +16,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5
1616
EndProject
1717
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Trace", "src\Serilog.Sinks.Trace\Serilog.Sinks.Trace.xproj", "{8849C92D-2120-4C82-8226-22DF40195237}"
1818
EndProject
19+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5C546512-0A16-4730-BE35-88AD31D32AD7}"
20+
EndProject
21+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Trace.Tests", "test\Serilog.Sinks.Trace.Tests\Serilog.Sinks.Trace.Tests.xproj", "{1D56534C-4009-42C2-A573-789CAE6B8AA9}"
22+
EndProject
1923
Global
2024
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2125
Debug|Any CPU = Debug|Any CPU
@@ -26,11 +30,16 @@ Global
2630
{8849C92D-2120-4C82-8226-22DF40195237}.Debug|Any CPU.Build.0 = Debug|Any CPU
2731
{8849C92D-2120-4C82-8226-22DF40195237}.Release|Any CPU.ActiveCfg = Release|Any CPU
2832
{8849C92D-2120-4C82-8226-22DF40195237}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{1D56534C-4009-42C2-A573-789CAE6B8AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{1D56534C-4009-42C2-A573-789CAE6B8AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{1D56534C-4009-42C2-A573-789CAE6B8AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{1D56534C-4009-42C2-A573-789CAE6B8AA9}.Release|Any CPU.Build.0 = Release|Any CPU
2937
EndGlobalSection
3038
GlobalSection(SolutionProperties) = preSolution
3139
HideSolutionNode = FALSE
3240
EndGlobalSection
3341
GlobalSection(NestedProjects) = preSolution
3442
{8849C92D-2120-4C82-8226-22DF40195237} = {037440DE-440B-4129-9F7A-09B42D00397E}
43+
{1D56534C-4009-42C2-A573-789CAE6B8AA9} = {5C546512-0A16-4730-BE35-88AD31D32AD7}
3544
EndGlobalSection
3645
EndGlobal

appveyor.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
version: '{build}'
2+
skip_tags: true
23
image: Visual Studio 2015
34
configuration: Release
45
install:
56
- ps: mkdir -Force ".\build\" | Out-Null
6-
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1" -OutFile ".\build\installcli.ps1"
7+
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
78
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
8-
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
9+
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
910
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
1011
build_script:
1112
- ps: ./Build.ps1
@@ -18,4 +19,11 @@ deploy:
1819
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
1920
skip_symbols: true
2021
on:
21-
branch: /^(dev|master)$/
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"projects": [ "src", "test" ],
3-
"sdk": {
4-
"version": "1.0.0-rc1-final"
5-
}
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-preview2-003121"
5+
}
66
}

src/Serilog.Sinks.Trace/Serilog.Sinks.Trace.xproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<ProjectGuid>8849c92d-2120-4c82-8226-22df40195237</ProjectGuid>
1010
<RootNamespace>Serilog</RootNamespace>
1111
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12-
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
1313
</PropertyGroup>
1414
<PropertyGroup>
1515
<SchemaVersion>2.0</SchemaVersion>
1616
</PropertyGroup>
17-
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
17+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
1818
</Project>

src/Serilog.Sinks.Trace/project.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.0-rc-*",
2+
"version": "2.0.0-*",
33
"description": "The diagnostic trace sink for Serilog.",
44
"authors": [
55
"Serilog Contributors"
@@ -15,16 +15,18 @@
1515
"iconUrl": "http://serilog.net/images/serilog-sink-nuget.png"
1616
},
1717
"dependencies": {
18-
"Serilog": "2.0.0-rc-556"
18+
"Serilog": "2.0.0"
1919
},
2020
"buildOptions": {
21-
"keyFile": "../../assets/Serilog.snk"
21+
"keyFile": "../../assets/Serilog.snk",
22+
"xmlDoc": true,
23+
"warningsAsErrors": true
2224
},
2325
"frameworks": {
2426
"net4.5": {},
2527
"netstandard1.3": {
2628
"dependencies": {
27-
"System.Diagnostics.TraceSource": "4.0.0-rc2-24027"
29+
"System.Diagnostics.TraceSource": "4.0.0"
2830
}
2931
}
3032
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyConfiguration("")]
9+
[assembly: AssemblyCompany("")]
10+
[assembly: AssemblyProduct("Serilog.Sinks.Trace.Tests")]
11+
[assembly: AssemblyTrademark("")]
12+
13+
// Setting ComVisible to false makes the types in this assembly not visible
14+
// to COM components. If you need to access a type in this assembly from
15+
// COM, set the ComVisible attribute to true on that type.
16+
[assembly: ComVisible(false)]
17+
18+
// The following GUID is for the ID of the typelib if this project is exposed to COM
19+
[assembly: Guid("1d56534c-4009-42c2-a573-789cae6b8aa9")]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
8+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
9+
<PropertyGroup Label="Globals">
10+
<ProjectGuid>1d56534c-4009-42c2-a573-789cae6b8aa9</ProjectGuid>
11+
<RootNamespace>Serilog.Sinks.Trace.Tests</RootNamespace>
12+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
13+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<SchemaVersion>2.0</SchemaVersion>
19+
</PropertyGroup>
20+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
21+
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"testRunner": "xunit",
3+
4+
"dependencies": {
5+
"NETStandard.Library": "1.6.0",
6+
"dotnet-test-xunit": "1.0.0-rc2-build10025",
7+
"xunit": "2.1.0",
8+
"Serilog.Sinks.Trace": { "target": "project" }
9+
},
10+
11+
"frameworks": {
12+
"net4.5.2": {},
13+
"netcoreapp1.0": {
14+
"dependencies": {
15+
"Microsoft.NETCore.App": {
16+
"type": "platform",
17+
"version": "1.0.0"
18+
}
19+
},
20+
"imports": [
21+
"dnxcore50",
22+
"portable-net45+win8"
23+
]
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)