Skip to content

Commit

Permalink
Seal internal classes; publish snupkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed Jun 7, 2024
1 parent 07a92ba commit 2b97f21
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
33 changes: 18 additions & 15 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Serilog.Enrichers;
/// <summary>
/// Enriches log events with a EnvironmentName property containing the value of the ASPNETCORE_ENVIRONMENT or DOTNET_ENVIRONMENT environment variable.
/// </summary>
class EnvironmentNameEnricher : CachedPropertyEnricher
sealed class EnvironmentNameEnricher : CachedPropertyEnricher
{
/// <summary>
/// The property name added to enriched log events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Serilog.Enrichers;
/// <summary>
/// Enriches log events with an EnvironmentUserName property containing [<see cref="Environment.UserDomainName"/>\]<see cref="Environment.UserName"/>.
/// </summary>
class EnvironmentUserNameEnricher : CachedPropertyEnricher
sealed class EnvironmentUserNameEnricher : CachedPropertyEnricher
{
/// <summary>
/// The property name added to enriched log events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Serilog.Enrichers;
/// <summary>
/// Enriches log events with a EnvironmentName property containing the value of the ASPNETCORE_ENVIRONMENT or DOTNET_ENVIRONMENT environment variable.
/// </summary>
class EnvironmentVariableEnricher : CachedPropertyEnricher
sealed class EnvironmentVariableEnricher : CachedPropertyEnricher
{
readonly string _envVarName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Serilog.Enrichers;
/// <summary>
/// Enriches log events with a MachineName property containing <see cref="Environment.MachineName"/>.
/// </summary>
class MachineNameEnricher : CachedPropertyEnricher
sealed class MachineNameEnricher : CachedPropertyEnricher
{
/// <summary>
/// The property name added to enriched log events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ItemGroup>
<PackageReference Include="Serilog" Version="4.0.0" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2b97f21

Please sign in to comment.