-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes Issue #4705 * Delete src/src.sln * Changed to using conditionals in the directory.build.props and adjusted csprojs and assemblyinfo.cs files accordingly. * Adding caketest * Update src/NUnitFramework/framework/nunit.framework.csproj Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com> * Update src/NUnitFramework/nunit.framework.legacy/nunit.framework.legacy.csproj Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com> * Update src/NUnitFramework/nunitlite/nunitlite.csproj Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com> * updated files and directory.build.props * commented out Choose, didnt work, in directory.build.props * Updated some tests, fixing nullrefs * reverted formatting * fix compiler warnings/errors * updated cake * Raise Error when compiling for a TargetFramework with no AssemblyConfiguration .NET 7.0 is out of support as of May 14th 2024. * Fixed null suppressions * Moved cake scripts to its own project and loaded the code into the build.cake * Fix null * Fix more minor stuff * Fix SA warnings * Using same file and assembly version numbers, same as we have done earlier * Final review changes * Fetch tags in CI * Updated to cake 4. Get a warnign about other cake tools like minver, raised a PR there too, but the warning can be safely ignored for now * Now we can use AsSpan in CakeScript --------- Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>
- Loading branch information
1 parent
376b434
commit 2d20f5d
Showing
33 changed files
with
316 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageReference Include="NUnit" Version="4.1.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" version="4.5.0" /> | ||
<PackageReference Include="coverlet.collector" Version="6.0.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\CakeScripts\CakeScripts.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt | ||
|
||
global using NUnit.Framework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt | ||
|
||
namespace CakeScripts.Tests; | ||
|
||
public class CakeTests | ||
{ | ||
[TestCase("1.2.3-beta.1", "1.2.3.0")] | ||
[TestCase("1.2.3", "1.2.3.0")] | ||
public void ThatWeCanParseAssemblyVersionStrings(string versionString, string expected) | ||
{ | ||
var parsedVersion = VersionParsers.ParseAssemblyVersion(versionString); | ||
Assert.That(parsedVersion, Is.EqualTo(expected)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt | ||
|
||
public static class VersionParsers | ||
{ | ||
public static string ParseAssemblyVersion(string version) | ||
{ | ||
var dash = version.LastIndexOf('-'); | ||
if (dash > 0) | ||
{ | ||
return string.Concat(version.AsSpan(0, dash), ".0"); | ||
} | ||
return version + ".0"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.