Skip to content

Commit

Permalink
Prepare for new major version (#242)
Browse files Browse the repository at this point in the history
* Target net8.0 only

* Address warnings

* Update testing packages

* Update CI workflow
  • Loading branch information
bording authored Jul 10, 2024
1 parent 3bc6726 commit 7c1fe31
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Upload packages
Expand Down
6 changes: 3 additions & 3 deletions src/Particular.Approvals/Approver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void ThrowExceptionWithDiff(string approvedFile, string receivedFile, str
var snippetDiffPoint = Enumerable.Range(0, shortestSnippetLength).FirstOrDefault(i => approvedSnippet[i] != receivedSnippet[i]);

b.Append(new string('-', snippetDiffPoint + approvedStub.Length));
b.Append("^");
b.Append('^');
}

throw new Exception(b.ToString());
Expand All @@ -140,10 +140,10 @@ static string StringRange(string source, int start, int end)
{
if (end >= source.Length)
{
return source.Substring(start);
return source[start..];
}

return source.Substring(start, end - start);
return source[start..end];
}

static string DisplaySpecialChars(string source) => source.Replace("\r", "\\r").Replace("\n", "\\n").Replace("\t", "\\t");
Expand Down
3 changes: 1 addition & 2 deletions src/Particular.Approvals/Particular.Approvals.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\NServiceBus.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Particular.Packaging" Version="4.1.0" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Particular.Approvals\Particular.Approvals.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0" />
Expand Down

0 comments on commit 7c1fe31

Please sign in to comment.