Skip to content

Commit 6174092

Browse files
authored
Merge pull request #1 from jcasale/dev
Updates Serilog and adds tests.
2 parents af1248f + c713e9a commit 6174092

28 files changed

+586
-249
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ insert_final_newline = false
8585
#### .NET Coding Conventions ####
8686

8787
# Organize usings
88-
dotnet_separate_import_directive_groups = false
88+
dotnet_separate_import_directive_groups = true
8989
dotnet_sort_system_directives_first = true
9090

9191
# this. and Me. preferences

.github/workflows/main.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,28 @@ jobs:
2424

2525
- name: Setup wix
2626
run: |
27-
dotnet.exe tool install --global wix
27+
dotnet.exe tool install --global wix --version 4.0.4 --verbosity diag
2828
29-
wix.exe extension add WixToolset.UI.wixext --global
29+
wix.exe extension add WixToolset.UI.wixext/4.0.4 --global
30+
wix.exe extension list --global
3031
31-
nuget.exe install WixToolset.Heat -NonInteractive
32+
nuget.exe install WixToolset.Heat -Version 4.0.4 -NonInteractive -Verbosity detailed
3233
Get-ChildItem -Path .\WixToolset.Heat* -Recurse |
3334
Where-Object { $_.FullName.EndsWith('x64\heat.exe') } |
3435
Select-Object -ExpandProperty DirectoryName |
3536
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3637
37-
- name: Generate module manifest and version properties
38+
- name: Generate version property
3839
id: version
3940
run: |
40-
New-Item ./publish -ItemType Directory -ErrorAction Stop |Out-Null
41+
$tag = git.exe describe --tags --long
42+
$version = [version]::new($tag.Split('-')[0].TrimStart('v'))
4143
42-
if ('${{ github.ref_type }}' -eq 'tag')
43-
{
44-
$tag = "${{ github.ref_name }}".TrimStart("v")
45-
./src/ModuleManifest.ps1 -Path ./publish/PSSerilog.psd1 -Verbose -ErrorAction Stop
46-
./src/VersionInfo.ps1 -Verbose -ErrorAction Stop
47-
}
48-
else
49-
{
50-
$tag = '0.0.1'
51-
./src/ModuleManifest.ps1 -Version $tag -Path ./publish/PSSerilog.psd1 -Verbose -ErrorAction Stop
52-
./src/VersionInfo.ps1 -Version $tag -Verbose -ErrorAction Stop
53-
}
54-
55-
$version = [version]::new($tag)
5644
echo "version=$version" >> $env:GITHUB_OUTPUT
5745
46+
- name: Run tests
47+
run: dotnet.exe test .\src\PSSerilog.sln
48+
5849
- name: Clean solution
5950
run: dotnet.exe clean .\src\PSSerilog.sln --configuration Release
6051

src/Directory.Build.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<Copyright>Copyright (c) Joseph L. Casale. All rights reserved.</Copyright>
88
</PropertyGroup>
99

10-
<Import Project=".\version.props" Condition="Exists('.\version.props')" />
10+
<PropertyGroup>
11+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)StyleCop.ruleset</CodeAnalysisRuleSet>
12+
</PropertyGroup>
1113

1214
</Project>

src/ModuleManifest.ps1

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/PSSerilog.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C7EE16A6-CF23-46CF-8C33-E71E28353D0D}"
99
ProjectSection(SolutionItems) = preProject
1010
..\.editorconfig = ..\.editorconfig
11+
StyleCop.ruleset = StyleCop.ruleset
1112
EndProjectSection
1213
EndProject
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{A071EC5E-47A2-4FF8-BA35-5B4DB360C203}"
15+
EndProject
1316
Global
1417
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1518
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +23,10 @@ Global
2023
{9692ACAE-59C0-48A0-BB3F-26F5CD245239}.Debug|Any CPU.Build.0 = Debug|Any CPU
2124
{9692ACAE-59C0-48A0-BB3F-26F5CD245239}.Release|Any CPU.ActiveCfg = Release|Any CPU
2225
{9692ACAE-59C0-48A0-BB3F-26F5CD245239}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{A071EC5E-47A2-4FF8-BA35-5B4DB360C203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{A071EC5E-47A2-4FF8-BA35-5B4DB360C203}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{A071EC5E-47A2-4FF8-BA35-5B4DB360C203}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{A071EC5E-47A2-4FF8-BA35-5B4DB360C203}.Release|Any CPU.Build.0 = Release|Any CPU
2330
EndGlobalSection
2431
GlobalSection(SolutionProperties) = preSolution
2532
HideSolutionNode = FALSE

src/PSSerilog/AddSerilogSinkConsoleCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace PSSerilog;
22

33
using System;
44
using System.Management.Automation;
5+
56
using Serilog;
67
using Serilog.Core;
78
using Serilog.Events;

0 commit comments

Comments
 (0)