diff --git a/Build.ps1 b/Build.ps1 index ba41ab1..7886e8f 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -23,13 +23,13 @@ foreach ($src in ls src/*) { echo "build: Packaging project in $src" - & dotnet build -c Release --version-suffix=$buildSuffix -p:EnableSourceLink=true + & dotnet build -c Release --version-suffix=$buildSuffix -p:ContinuousIntegrationBuild=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) { throw "build failed" } + if($LASTEXITCODE -ne 0) { throw "build failed" } Pop-Location } diff --git a/appveyor.yml b/appveyor.yml index 81bd95e..d367cf6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,22 +2,25 @@ version: '{build}' skip_tags: true image: Visual Studio 2022 build_script: - - pwsh: ./Build.ps1 + - pwsh: ./Build.ps1 test: off artifacts: - - path: artifacts/Serilog.*.nupkg + - path: artifacts/Serilog.*.nupkg + - path: artifacts/Serilog.*.snupkg deploy: - - provider: NuGet - api_key: - secure: Fh92tRIFbe1FAiyD8lTThWgAorQ1vV+eFYMlUK0iLHBBenJcy/UYc1qj6kgHvUcO - skip_symbols: true - on: - branch: /^(main|dev)$/ - - provider: GitHub - auth_token: - secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX - artifact: /Serilog.*\.nupkg/ - tag: v$(appveyor_build_version) - on: - branch: main + - provider: NuGet + api_key: + secure: Fh92tRIFbe1FAiyD8lTThWgAorQ1vV+eFYMlUK0iLHBBenJcy/UYc1qj6kgHvUcO + skip_symbols: true + on: + branch: /^(main|dev)$/ + - provider: GitHub + auth_token: + secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX + artifacts: + /Serilog.*\.nupkg/ + /Serilog.*\.snupkg/ + tag: v$(appveyor_build_version) + on: + branch: main \ No newline at end of file diff --git a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentNameEnricher.cs b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentNameEnricher.cs index b3c9569..82c68b2 100644 --- a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentNameEnricher.cs +++ b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentNameEnricher.cs @@ -21,7 +21,7 @@ namespace Serilog.Enrichers; /// /// Enriches log events with a EnvironmentName property containing the value of the ASPNETCORE_ENVIRONMENT or DOTNET_ENVIRONMENT environment variable. /// -class EnvironmentNameEnricher : CachedPropertyEnricher +sealed class EnvironmentNameEnricher : CachedPropertyEnricher { /// /// The property name added to enriched log events. diff --git a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs index 7eed351..a1b9675 100644 --- a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs +++ b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentUserNameEnricher.cs @@ -21,7 +21,7 @@ namespace Serilog.Enrichers; /// /// Enriches log events with an EnvironmentUserName property containing [\]. /// -class EnvironmentUserNameEnricher : CachedPropertyEnricher +sealed class EnvironmentUserNameEnricher : CachedPropertyEnricher { /// /// The property name added to enriched log events. diff --git a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentVariableEnricher.cs b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentVariableEnricher.cs index 5bac94f..0ca0912 100644 --- a/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentVariableEnricher.cs +++ b/src/Serilog.Enrichers.Environment/Enrichers/EnvironmentVariableEnricher.cs @@ -21,7 +21,7 @@ namespace Serilog.Enrichers; /// /// Enriches log events with a EnvironmentName property containing the value of the ASPNETCORE_ENVIRONMENT or DOTNET_ENVIRONMENT environment variable. /// -class EnvironmentVariableEnricher : CachedPropertyEnricher +sealed class EnvironmentVariableEnricher : CachedPropertyEnricher { readonly string _envVarName; diff --git a/src/Serilog.Enrichers.Environment/Enrichers/MachineNameEnricher.cs b/src/Serilog.Enrichers.Environment/Enrichers/MachineNameEnricher.cs index 7cf4a64..55ff49e 100644 --- a/src/Serilog.Enrichers.Environment/Enrichers/MachineNameEnricher.cs +++ b/src/Serilog.Enrichers.Environment/Enrichers/MachineNameEnricher.cs @@ -21,7 +21,7 @@ namespace Serilog.Enrichers; /// /// Enriches log events with a MachineName property containing . /// -class MachineNameEnricher : CachedPropertyEnricher +sealed class MachineNameEnricher : CachedPropertyEnricher { /// /// The property name added to enriched log events. diff --git a/src/Serilog.Enrichers.Environment/Serilog.Enrichers.Environment.csproj b/src/Serilog.Enrichers.Environment/Serilog.Enrichers.Environment.csproj index 914933a..ab003f8 100644 --- a/src/Serilog.Enrichers.Environment/Serilog.Enrichers.Environment.csproj +++ b/src/Serilog.Enrichers.Environment/Serilog.Enrichers.Environment.csproj @@ -28,6 +28,7 @@ +