From 8f08613a2bb3148a01bc473dbc38a8740ce8126d Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sat, 11 Apr 2020 00:26:39 -0500 Subject: [PATCH 1/6] Upgrade to new project format xproj to new csproj via `dotnet migrate` on sdk 1.1.14 Implements #5 --- Serilog.Sinks.TextWriter.sln | 11 +++-- global.json | 6 --- .../Serilog.Sinks.TextWriter.csproj | 34 ++++++++++++++++ .../Serilog.Sinks.TextWriter.xproj | 18 --------- src/Serilog.Sinks.TextWriter/project.json | 32 --------------- test/Serilog.Tests/Serilog.Tests.csproj | 40 +++++++++++++++++++ test/Serilog.Tests/Serilog.Tests.xproj | 18 --------- test/Serilog.Tests/project.json | 33 --------------- 8 files changed, 79 insertions(+), 113 deletions(-) delete mode 100644 global.json create mode 100644 src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj delete mode 100644 src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.xproj delete mode 100644 src/Serilog.Sinks.TextWriter/project.json create mode 100644 test/Serilog.Tests/Serilog.Tests.csproj delete mode 100644 test/Serilog.Tests/Serilog.Tests.xproj delete mode 100644 test/Serilog.Tests/project.json diff --git a/Serilog.Sinks.TextWriter.sln b/Serilog.Sinks.TextWriter.sln index 1b9be1d..4a5c266 100644 --- a/Serilog.Sinks.TextWriter.sln +++ b/Serilog.Sinks.TextWriter.sln @@ -1,7 +1,7 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.26114.2 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}" EndProject @@ -9,17 +9,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5 ProjectSection(SolutionItems) = preProject appveyor.yml = appveyor.yml Build.ps1 = Build.ps1 - global.json = global.json NuGet.Config = NuGet.Config README.md = README.md assets\Serilog.snk = assets\Serilog.snk EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.TextWriter", "src\Serilog.Sinks.TextWriter\Serilog.Sinks.TextWriter.xproj", "{E85ABEC7-9B4C-432C-9A04-AC5BE9205D9F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.TextWriter", "src\Serilog.Sinks.TextWriter\Serilog.Sinks.TextWriter.csproj", "{E85ABEC7-9B4C-432C-9A04-AC5BE9205D9F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9B68D540-8107-4748-8A64-CF5F7F0E1B1E}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/global.json b/global.json deleted file mode 100644 index 34b4934..0000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": [ "src", "test" ], - "sdk": { - "version": "1.0.0-preview2-003121" - } -} diff --git a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj new file mode 100644 index 0000000..8c03b97 --- /dev/null +++ b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj @@ -0,0 +1,34 @@ + + + + The System.IO.TextWriter sink for Serilog + 2.1.1 + Serilog Contributors + net45;netstandard1.0 + true + Serilog.Sinks.TextWriter + ../../assets/Serilog.snk + true + true + Serilog.Sinks.TextWriter + serilog;IO;text;writer + http://serilog.net/images/serilog-sink-nuget.png + http://serilog.net + http://www.apache.org/licenses/LICENSE-2.0 + false + + + + + + + + + + + + + + + + diff --git a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.xproj b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.xproj deleted file mode 100644 index 0cad53d..0000000 --- a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - e85abec7-9b4c-432c-9a04-ac5be9205d9f - Serilog - ..\..\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Serilog.Sinks.TextWriter/project.json b/src/Serilog.Sinks.TextWriter/project.json deleted file mode 100644 index d9f19c8..0000000 --- a/src/Serilog.Sinks.TextWriter/project.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": "2.1.1-*", - "description": "The System.IO.TextWriter sink for Serilog", - "authors": [ "Serilog Contributors" ], - - "packOptions" :{ - "tags": [ "serilog", "IO", "text", "writer" ], - "projectUrl": "http://serilog.net", - "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0", - "iconUrl": "http://serilog.net/images/serilog-sink-nuget.png" - }, - - "buildOptions": { - "keyFile": "../../assets/Serilog.snk", - "xmlDoc": true - }, - "dependencies": { - "Serilog": "2.0.0" - }, - "compilationOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - "frameworks": { - "net4.5": { - }, - "netstandard1.0": { - "dependencies": { - "System.IO": "4.1.0" - } - } - } -} diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj new file mode 100644 index 0000000..1a9ef2d --- /dev/null +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -0,0 +1,40 @@ + + + + 2.0.0-rc + net452;netcoreapp1.0 + Serilog.Tests + ../../assets/Serilog.snk + true + true + Serilog.Tests + true + $(PackageTargetFallback);dnxcore50;portable-net45+win8 + 1.0.4 + + + + + + + + + + + + + + + + + + + + + + + + $(DefineConstants);APPDOMAIN;REMOTING;GETCURRENTMETHOD + + + diff --git a/test/Serilog.Tests/Serilog.Tests.xproj b/test/Serilog.Tests/Serilog.Tests.xproj deleted file mode 100644 index 25153e5..0000000 --- a/test/Serilog.Tests/Serilog.Tests.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 3c2d8e01-5580-426a-bdd9-ec59cd98e618 - Serilog.Tests - ..\..\artifacts\obj\$(MSBuildProjectName) - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/test/Serilog.Tests/project.json b/test/Serilog.Tests/project.json deleted file mode 100644 index 2875913..0000000 --- a/test/Serilog.Tests/project.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "2.0.0-rc-*", - "testRunner": "xunit", - "dependencies": { - "Serilog": "2.0.0", - "Serilog.Sinks.TextWriter": { "target": "project" }, - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10025" - }, - "buildOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - "frameworks": { - "net4.5.2": { - "buildOptions": { - "define": [ "APPDOMAIN", "REMOTING", "GETCURRENTMETHOD" ] - } - }, - "netcoreapp1.0": { - "define": [ "ASYNCLOCAL" ], - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - } - }, - "imports": [ - "dnxcore50", - "portable-net45+win8" - ] - } - } -} \ No newline at end of file From 475e9430e1606197055dfd968888be53c40a5124 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sat, 11 Apr 2020 00:48:02 -0500 Subject: [PATCH 2/6] Remove redundant package references netstandard1.0 has a dependency on System.IO (>= 4.3.0) but Serilog.Sinks.TextWriter.csproj explicitly targets System.IO 4.1.0, causing downgrade errors (NU1605). And net45 has System and Microsoft.CSharp. This removes the already implicitly referenced dependencies. --- .../Serilog.Sinks.TextWriter.csproj | 9 --------- test/Serilog.Tests/Serilog.Tests.csproj | 5 ----- 2 files changed, 14 deletions(-) diff --git a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj index 8c03b97..4c521c8 100644 --- a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj +++ b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj @@ -22,13 +22,4 @@ - - - - - - - - - diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj index 1a9ef2d..5378d88 100644 --- a/test/Serilog.Tests/Serilog.Tests.csproj +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -28,11 +28,6 @@ - - - - - $(DefineConstants);APPDOMAIN;REMOTING;GETCURRENTMETHOD From 395a10801d08698971121383f782f3f713e910ea Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sat, 11 Apr 2020 00:52:31 -0500 Subject: [PATCH 3/6] Update test packages to stable versions Just updates the Serilog.Tests dependencies to the stable versions of the beta references. --- test/Serilog.Tests/Serilog.Tests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj index 5378d88..0a1ca0f 100644 --- a/test/Serilog.Tests/Serilog.Tests.csproj +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -22,10 +22,10 @@ - - + + - + From 90f77f81953b1d757568074d52f795ec4b1599d4 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sat, 11 Apr 2020 01:12:21 -0500 Subject: [PATCH 4/6] Update appveyor for csproj and NuGet API key based on https://github.com/serilog/serilog-sinks-console/blob/59d2e8fcece167ea777782edf6cbbf118be6c231/appveyor.yml --- appveyor.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 078620b..53ffc3e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,16 @@ version: '{build}' skip_tags: true -image: Visual Studio 2015 +image: Visual Studio 2017 configuration: Release -install: - - ps: mkdir -Force ".\build\" | Out-Null - - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" - - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli" - - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121' - - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" +test: off build_script: - ps: ./Build.ps1 -test: off artifacts: - path: artifacts/Serilog.*.nupkg deploy: - provider: NuGet api_key: - secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x + secure: N59tiJECUYpip6tEn0xvdmDAEiP9SIzyLEFLpwiigm/8WhJvBNs13QxzT1/3/JW/ skip_symbols: true on: branch: /^(master|dev)$/ @@ -26,5 +20,4 @@ deploy: artifact: /Serilog.*\.nupkg/ tag: v$(appveyor_build_version) on: - branch: master - + branch: master \ No newline at end of file From c669772601a83273dc0aa66c4ca7b1a0efa96089 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Wed, 25 May 2022 17:06:58 -0500 Subject: [PATCH 5/6] Revert "Update appveyor for csproj and NuGet API key" This reverts commit 90f77f81953b1d757568074d52f795ec4b1599d4. --- appveyor.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 53ffc3e..078620b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,16 +1,22 @@ version: '{build}' skip_tags: true -image: Visual Studio 2017 +image: Visual Studio 2015 configuration: Release -test: off +install: + - ps: mkdir -Force ".\build\" | Out-Null + - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" + - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli" + - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121' + - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" build_script: - ps: ./Build.ps1 +test: off artifacts: - path: artifacts/Serilog.*.nupkg deploy: - provider: NuGet api_key: - secure: N59tiJECUYpip6tEn0xvdmDAEiP9SIzyLEFLpwiigm/8WhJvBNs13QxzT1/3/JW/ + secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x skip_symbols: true on: branch: /^(master|dev)$/ @@ -20,4 +26,5 @@ deploy: artifact: /Serilog.*\.nupkg/ tag: v$(appveyor_build_version) on: - branch: master \ No newline at end of file + branch: master + From 8e099614cd1446e49b8caa50b032eb181fe239b5 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Wed, 25 May 2022 17:44:38 -0500 Subject: [PATCH 6/6] Update with serilog-sinks-file @ d2117ab67d588a49e36a9a38d5a5ed3f16e23157 as a reference --- .editorconfig | 13 +++++++++- .gitignore | 4 +++ .travis.yml | 11 ++++++++ Build.ps1 | 25 ++++++++---------- Serilog.Sinks.TextWriter.sln | 15 ++++++----- appveyor.yml | 21 ++++++++------- build.sh | 17 ++++++++++++ .../Properties/AssemblyInfo.cs | 2 -- .../Serilog.Sinks.TextWriter.csproj | 14 +++++++--- test/Serilog.Tests/Serilog.Tests.csproj | 26 ++++++------------- 10 files changed, 94 insertions(+), 54 deletions(-) create mode 100644 .travis.yml create mode 100644 build.sh diff --git a/.editorconfig b/.editorconfig index f76c08a..102e19f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,16 @@ -root=true +root = true [*] +trim_trailing_whitespace = true +insert_final_newline = true indent_style = space indent_size = 4 + +[*.{csproj,json,config,yml,props}] +indent_size = 2 + +[*.sh] +end_of_line = lf + +[*.{cmd, bat}] +end_of_line = crlf diff --git a/.gitignore b/.gitignore index 94420dc..d8704ba 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,9 @@ bld/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ +# Rider cache/options directory +.idea + # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -234,3 +237,4 @@ _Pvt_Extensions # FAKE - F# Make .fake/ +example/Sample/log.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3b4b3bb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: csharp + +matrix: + include: + - os: linux + dist: trusty + sudo: required + dotnet: 2.1.300 + group: edge +script: + - ./build.sh diff --git a/Build.ps1 b/Build.ps1 index 7c5a85f..3c41f46 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -11,32 +11,29 @@ if(Test-Path .\artifacts) { $branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL]; $revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; -$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"] +$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "main" -and $revision -ne "local"] +$commitHash = $(git rev-parse --short HEAD) +$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""] -echo "build: Version suffix is $suffix" +echo "build: Package version suffix is $suffix" +echo "build: Build version suffix is $buildSuffix" foreach ($src in ls src/*) { Push-Location $src echo "build: Packaging project in $src" - & dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix + & dotnet build -c Release --version-suffix=$buildSuffix -p:EnableSourceLink=true + if ($suffix) { + & dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build + } else { + & dotnet pack -c Release -o ..\..\artifacts --no-build + } if($LASTEXITCODE -ne 0) { exit 1 } Pop-Location } -foreach ($test in ls test/*.PerformanceTests) { - Push-Location $test - - echo "build: Building performance test project in $test" - - & dotnet build -c Release - if($LASTEXITCODE -ne 0) { exit 2 } - - Pop-Location -} - foreach ($test in ls test/*.Tests) { Push-Location $test diff --git a/Serilog.Sinks.TextWriter.sln b/Serilog.Sinks.TextWriter.sln index 4a5c266..4d16c76 100644 --- a/Serilog.Sinks.TextWriter.sln +++ b/Serilog.Sinks.TextWriter.sln @@ -1,24 +1,24 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26114.2 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32519.111 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig appveyor.yml = appveyor.yml Build.ps1 = Build.ps1 - NuGet.Config = NuGet.Config + build.sh = build.sh README.md = README.md assets\Serilog.snk = assets\Serilog.snk EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.TextWriter", "src\Serilog.Sinks.TextWriter\Serilog.Sinks.TextWriter.csproj", "{E85ABEC7-9B4C-432C-9A04-AC5BE9205D9F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.TextWriter", "src\Serilog.Sinks.TextWriter\Serilog.Sinks.TextWriter.csproj", "{E85ABEC7-9B4C-432C-9A04-AC5BE9205D9F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9B68D540-8107-4748-8A64-CF5F7F0E1B1E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -42,4 +42,7 @@ Global {E85ABEC7-9B4C-432C-9A04-AC5BE9205D9F} = {037440DE-440B-4129-9F7A-09B42D00397E} {3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {9B68D540-8107-4748-8A64-CF5F7F0E1B1E} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6E99B354-3D27-4D13-BCB1-904C974D9A82} + EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml index 078620b..ad4973c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,24 @@ version: '{build}' skip_tags: true -image: Visual Studio 2015 -configuration: Release -install: - - ps: mkdir -Force ".\build\" | Out-Null - - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" - - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli" - - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121' - - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" +image: + - Visual Studio 2019 + - Ubuntu build_script: - ps: ./Build.ps1 +for: +- + matrix: + only: + - image: Ubuntu + build_script: + - sh build.sh test: off artifacts: - path: artifacts/Serilog.*.nupkg deploy: - provider: NuGet api_key: - secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x + secure: rbdBqxBpLt4MkB+mrDOYNDOd8aVZ1zMkysaVNAXNKnC41FYifzX3l9LM8DCrUWU5 skip_symbols: true on: branch: /^(master|dev)$/ @@ -27,4 +29,3 @@ deploy: tag: v$(appveyor_build_version) on: branch: master - diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..3bb5fec --- /dev/null +++ b/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e +dotnet --info +dotnet --list-sdks +dotnet restore + +echo "🤖 Attempting to build..." +for path in src/**/*.csproj; do + dotnet build -f netstandard1.3 -c Release ${path} + dotnet build -f netstandard2.0 -c Release ${path} +done + +echo "🤖 Running tests..." +for path in test/*.Tests/*.csproj; do + dotnet test -f netcoreapp2.0 -c Release ${path} +done diff --git a/src/Serilog.Sinks.TextWriter/Properties/AssemblyInfo.cs b/src/Serilog.Sinks.TextWriter/Properties/AssemblyInfo.cs index 1237c0e..0c4561b 100644 --- a/src/Serilog.Sinks.TextWriter/Properties/AssemblyInfo.cs +++ b/src/Serilog.Sinks.TextWriter/Properties/AssemblyInfo.cs @@ -2,8 +2,6 @@ using System.Reflection; using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("2.0.0.0")] - [assembly: CLSCompliant(true)] [assembly: InternalsVisibleTo("Serilog.Tests, PublicKey=" + diff --git a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj index 4c521c8..1bfce19 100644 --- a/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj +++ b/src/Serilog.Sinks.TextWriter/Serilog.Sinks.TextWriter.csproj @@ -14,12 +14,20 @@ serilog;IO;text;writer http://serilog.net/images/serilog-sink-nuget.png http://serilog.net - http://www.apache.org/licenses/LICENSE-2.0 - false + Apache-2.0 + https://github.com/serilog/serilog-sinks-textwriter + git + Serilog + true + true + false + true + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - + + diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj index 0a1ca0f..c544d76 100644 --- a/test/Serilog.Tests/Serilog.Tests.csproj +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -1,35 +1,25 @@ - + - 2.0.0-rc - net452;netcoreapp1.0 + net48;net5.0 Serilog.Tests ../../assets/Serilog.snk true true - Serilog.Tests true - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.0.4 - - - - - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - $(DefineConstants);APPDOMAIN;REMOTING;GETCURRENTMETHOD - -