Skip to content

Commit

Permalink
Fix GitVersion (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinki14 authored Dec 30, 2023
1 parent 697ebcd commit d5db0e3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ mode: ContinuousDelivery
branches:
main:
regex: ^v2.12.0-cfx$
source-branches: []
mode: ContinuousDeployment
tag: ci
track-merge-target: true
ignore:
sha: []
merge-message-formats: {}
tag-prefix: "v"
tag-prefix: '^v(?!2\.12\.0-serilog)[\d.]+$'
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CitizenFX.Extensions.Client.Serilog
A fork of the [diagnostic logging library known as Serilog](https://serilog.net/), based off [v2.12.0 of Serilog](https://github.com/serilog/serilog/tree/v2.12.0) for compatability with [.NET client-side FiveM](https://fivem.net/)
[![Downloads](https://img.shields.io/nuget/dt/CitizenFX.Extensions.Client.Serilog?style=flat-square)](https://www.nuget.org/packages/CitizenFX.Extensions.Client.Serilog)
[![GitHub release](https://img.shields.io/github/v/release/Twinki14/CitizenFX.Extensions.Client.Serilog?style=flat-square)](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/releases)
[![Nuget](https://img.shields.io/nuget/v/CitizenFX.Extensions.Client.Serilog?style=flat-square)](https://www.nuget.org/packages/CitizenFX.Extensions.Client.Serilog)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Twinki14/CitizenFX.Extensions.Client.Serilog/build-publish.yaml?style=flat-square)](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/actions/workflows/build-publish.yaml)

A fork of the [logging library known as Serilog](https://serilog.net/), based off [v2.12.0](https://github.com/serilog/serilog/tree/v2.12.0) for compatability with [.NET client-side FiveM](https://fivem.net/)


## Example
```csharp
Expand All @@ -14,6 +20,8 @@ logger.Information("Hello from the FiveM client!");
## Changes from [v2.12.0 of Serilog](https://github.com/serilog/serilog/tree/v2.12.0)
### v2.12.0-cfx
- [#1](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/pull/1) - Trim files, remove assembly signing, only target net452
- [#2](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/pull/2) - Add CI/CD proceeded by fix [in #4](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/pull/4)
- [#3](https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/pull/3) - Remove extra performance tests & results, this just bloated things for the purpose of this fork

## Notes
- This fork is in **NO WAY** affiliated with the [Serilog Organization](https://github.com/serilog) or the [Serilog project](https://serilog.net/), it's purely a fork to provide compatability with FiveM's client-resource shipped mono
Expand Down
5 changes: 1 addition & 4 deletions src/Serilog/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[assembly: AssemblyVersion("2.0.0.0")]

[assembly: CLSCompliant(true)]
[assembly: CLSCompliant(true)]

[assembly: InternalsVisibleTo("Serilog.Tests")]
[assembly: InternalsVisibleTo("Serilog.PerformanceTests")]
9 changes: 6 additions & 3 deletions src/Serilog/Serilog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<Description>Simple .NET logging with fully-structured events</Description>
<Authors>Serilog Contributors;Twinki14</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>serilog;logging;semantic;structured</PackageTags>
<PackageTags>serilog;logging;semantic;structured;fivem;cfx-extensions</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<PackageId>CitizenFX.Extensions.Client.Serilog</PackageId>
<PackageProjectUrl>https://github.com/Twinki14/CitizenFX.Extensions.Client.Serilog/</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<TreatSpecificWarningsAsErrors />
<TargetFramework>net452</TargetFramework>
<AssemblyName>CitizenFX.Extensions.Client.Serilog</AssemblyName>
<RootNamespace>Serilog</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
Expand All @@ -26,11 +29,11 @@

<ItemGroup>
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
<PackageReference Include="GitVersionTask" Version="5.1.2">
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public void SinksWithAbstractParamsAreConfiguredWithTypeName()
Assert.IsType<CustomConsoleTheme>(DummyConsoleSink.Theme);
}

[Fact]
[Fact(Skip = "Skipped due to project condesing")]
public void SinksAreConfiguredWithStaticMember()
{
var settings = new Dictionary<string, string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void StaticMembersAccessorsCanBeUsedForReferenceTypes(string input, Type
Assert.Equal(ConcreteImpl.Instance, actual);
}

[Theory]
[Theory(Skip = "Skipped due to project condensing")]
// unknown type
[InlineData("Namespace.ThisIsNotAKnownType::InterfaceProperty, Serilog.Tests", typeof(IAmAnInterface))]
// good type name, but wrong namespace
Expand Down

0 comments on commit d5db0e3

Please sign in to comment.