Skip to content

Commit 1e83316

Browse files
authored
Merge pull request #86 from serilog/dev
2.4.0 Release
2 parents 2df3a9f + e193021 commit 1e83316

17 files changed

+299
-106
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4
8+
9+
[*.{csproj,json,config,yml,props}]
10+
indent_size = 2
11+
12+
[*.sh]
13+
end_of_line = lf
14+
15+
[*.{cmd, bat}]
16+
end_of_line = crlf

Build.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
echo "build: Build started"
22

3+
& dotnet --info
4+
& dotnet --list-sdks
5+
36
Push-Location $PSScriptRoot
47

58
if(Test-Path .\artifacts) {
@@ -12,13 +15,24 @@ if(Test-Path .\artifacts) {
1215
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
1316
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
1417
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
18+
$commitHash = $(git rev-parse --short HEAD)
19+
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
1520

1621
echo "build: Version suffix is $suffix"
22+
echo "build: Build version suffix is $buildSuffix"
23+
1724
foreach ($src in ls src/*) {
1825
Push-Location $src
1926
echo "build: Packaging project in $src"
2027

21-
& dotnet pack -c Release -o ..\..\artifacts --include-symbols --version-suffix=$suffix
28+
& dotnet build -c Release --version-suffix=$buildSuffix
29+
30+
if($suffix) {
31+
& dotnet pack -c Release --no-build -o ..\..\artifacts --version-suffix=$suffix
32+
} else {
33+
& dotnet pack -c Release --no-build -o ..\..\artifacts
34+
}
35+
2236
if($LASTEXITCODE -ne 0) { exit 1 }
2337

2438
Pop-Location

Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<!-- Workaround for https://github.com/dotnet/sdk/pull/908 -->
3+
<Target Name="GetPackagingOutputs" />
4+
<PropertyGroup>
5+
<LangVersion>latest</LangVersion>
6+
</PropertyGroup>
7+
</Project>

Setup.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
$RequiredDotnetVersion = $(cat ./global.json | convertfrom-json).sdk.version
4+
5+
mkdir "./build"
6+
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./build/installcli.ps1"
7+
& ./build/installcli.ps1 -InstallDir "$pwd/.dotnetcli" -NoPath -Version $RequiredDotnetVersion
8+
if ($LASTEXITCODE) { exit 1 }
9+
10+
$env:Path = "$pwd/.dotnetcli;$env:Path"

appveyor.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2017
3+
image:
4+
- Visual Studio 2019
5+
- Ubuntu
46
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/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.1'
10-
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
7+
test: off
8+
#install:
9+
#- ps: ./Setup.ps1
1110
build_script:
1211
- ps: ./Build.ps1
13-
test: off
12+
for:
13+
-
14+
matrix:
15+
only:
16+
- image: Ubuntu
17+
# install:
18+
# - sh setup.sh
19+
build_script:
20+
- sh build.sh
1421
artifacts:
1522
- path: artifacts/Serilog.*.nupkg
23+
- path: artifacts/Serilog.*.snupkg
1624
deploy:
1725
- provider: NuGet
1826
api_key:
19-
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
27+
secure: K3/810hkTO6rd2AEHVkUQAadjGmDREus9k96QHu6hxrA1/wRTuAJemHMKtVVgIvf
2028
skip_symbols: true
2129
on:
2230
branch: /^(master|dev)$/
2331
- provider: GitHub
2432
auth_token:
2533
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
26-
artifact: /Serilog.*\.nupkg/
34+
artifact:
35+
/Serilog.*\.nupkg/
36+
/Serilog.*\.snupkg/
2737
tag: v$(appveyor_build_version)
2838
on:
2939
branch: master

build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
export PATH=$HOME/.dotnetcli:$PATH
6+
7+
dotnet --info
8+
dotnet --list-sdks
9+
dotnet restore
10+
11+
echo "🤖 Attempting to build..."
12+
for path in src/**/*.csproj; do
13+
dotnet build -f netstandard1.3 -c Release ${path}
14+
dotnet build -f netstandard2.0 -c Release ${path}
15+
dotnet build -f netstandard2.1 -c Release ${path}
16+
done
17+
18+
echo "🤖 Running tests..."
19+
for path in test/*.Tests/*.csproj; do
20+
dotnet test -f netcoreapp2.2 -c Release ${path}
21+
dotnet test -f netcoreapp3.1 -c Release ${path}
22+
done
23+

global.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"projects": [ "src", "test" ],
32
"sdk": {
4-
"version": "1.0.1"
3+
"allowPrerelease": false,
4+
"version": "3.1.100",
5+
"rollForward": "latestFeature"
56
}
67
}

serilog-sink-nuget.png

20.4 KB
Loading

serilog-sinks-email.sln

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26228.4
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30011.22
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{DACEA959-EA30-47CA-A300-6756E3EB35A4}"
77
ProjectSection(SolutionItems) = preProject
8+
.editorconfig = .editorconfig
89
.gitignore = .gitignore
910
appveyor.yml = appveyor.yml
1011
Build.ps1 = Build.ps1
12+
build.sh = build.sh
1113
CHANGES.md = CHANGES.md
14+
Directory.Build.props = Directory.Build.props
1215
global.json = global.json
1316
README.md = README.md
1417
assets\Serilog.snk = assets\Serilog.snk
18+
Setup.ps1 = Setup.ps1
19+
setup.sh = setup.sh
1520
EndProjectSection
1621
EndProject
1722
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{340DBC35-BD09-414B-818C-978FBCA4CDF1}"
@@ -64,4 +69,7 @@ Global
6469
{7BC4F72D-F40B-4F7C-8EBD-E50F0D6C0D97} = {70D17E86-9325-4228-8512-547B3E0774A1}
6570
{96A53337-1692-4884-BE03-34A97147EACE} = {340DBC35-BD09-414B-818C-978FBCA4CDF1}
6671
EndGlobalSection
72+
GlobalSection(ExtensibilityGlobals) = postSolution
73+
SolutionGuid = {9E7E183E-7DDE-45DB-ACE9-2055FB3B7847}
74+
EndGlobalSection
6775
EndGlobal

setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
sudo apt-get update && sudo apt-get install -y --no-install-recommends jq
4+
5+
RequiredDotnetVersion=$(jq -r '.sdk.version' global.json)
6+
7+
curl https://dot.net/v1/dotnet-install.sh -sSfL | bash -s -- --install-dir $HOME/.dotnetcli --no-path --version $RequiredDotnetVersion

0 commit comments

Comments
 (0)