Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NUKE and Fluent Assertions as GitVersion users #3061

Merged
merged 9 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
targetFramework: [net48, net5.0, net6.0, netcoreapp3.1]
targetFramework: [net6.0, netcoreapp3.1]
fail-fast: false

steps:
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
targetFramework: [ '3.1', '5.0', '6.0' ]
targetFramework: [ '3.1', '6.0' ]
distro: [ alpine.3.12, alpine.3.13, alpine.3.14, centos.7, centos.8, debian.9, debian.10, debian.11, fedora.33, ubuntu.18.04, ubuntu.20.04 ]
fail-fast: false

Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
targetFramework: [ '3.1', '5.0', '6.0' ]
targetFramework: [ '3.1', '6.0' ]
distro: [ alpine.3.12, alpine.3.13, alpine.3.14, centos.7, centos.8, debian.9, debian.10, debian.11, fedora.33, ubuntu.18.04, ubuntu.20.04 ]
fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion build/artifacts/Tasks/ArtifactsDotnetToolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
[TaskName(nameof(ArtifactsDotnetToolTest))]
[TaskDescription("Tests the dotnet global tool in docker container")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[IsDependentOn(typeof(ArtifactsPrepare))]
public class ArtifactsDotnetToolTest : FrostingTask<BuildContext>
Expand Down
3 changes: 1 addition & 2 deletions build/artifacts/Tasks/ArtifactsMsBuildCoreTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
[TaskName(nameof(ArtifactsMsBuildCoreTest))]
[TaskDescription("Tests the msbuild package in docker container")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[IsDependentOn(typeof(ArtifactsPrepare))]
public class ArtifactsMsBuildCoreTest : FrostingTask<BuildContext>
Expand Down Expand Up @@ -36,7 +36,6 @@ public override void Run(BuildContext context)
targetFramework = targetFramework switch
{
Constants.Version31 => $"netcoreapp{targetFramework}",
Constants.Version50 => $"net{targetFramework}",
Constants.Version60 => $"net{targetFramework}",
_ => targetFramework
};
Expand Down
18 changes: 1 addition & 17 deletions build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override void Run(BuildContext context)
var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath;

context.Information("\nTesting msbuild task with dotnet build (for .net core)\n");
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion50, Constants.NetVersion60 };
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
foreach (var framework in frameworks)
{
var dotnetMsBuildSettings = new DotNetMSBuildSettings();
Expand All @@ -43,21 +43,5 @@ public override void Run(BuildContext context)
var netcoreExe = Paths.Integration.Combine("core").Combine("build").Combine(framework).CombineWithFilePath("app.dll");
context.ValidateOutput("dotnet", netcoreExe.FullPath, context.Version.GitVersion.FullSemVer);
}

context.Information("\nTesting msbuild task with msbuild (for full framework)\n");

var msBuildSettings = new MSBuildSettings
{
Verbosity = Verbosity.Minimal,
Restore = true
};

msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
msBuildSettings.WithProperty("RestoreSource", nugetSource);

context.MSBuild("./tests/integration/full", msBuildSettings);

var fullExe = Paths.Integration.Combine("full").Combine("build").CombineWithFilePath("app.exe");
context.ValidateOutput(fullExe.FullPath, null, context.Version.GitVersion.FullSemVer);
}
}
2 changes: 1 addition & 1 deletion build/artifacts/Tasks/ArtifactsNativeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
[TaskName(nameof(ArtifactsNativeTest))]
[TaskDescription("Tests the native executables in docker container")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[IsDependentOn(typeof(ArtifactsPrepare))]
public class ArtifactsNativeTest : FrostingTask<BuildContext>
Expand Down
2 changes: 1 addition & 1 deletion build/artifacts/Tasks/ArtifactsPrepare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
[TaskName(nameof(ArtifactsPrepare))]
[TaskDescription("Pulls the docker images needed for testing the artifacts")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
public class ArtifactsPrepare : FrostingTask<BuildContext>
{
Expand Down
2 changes: 1 addition & 1 deletion build/artifacts/Tasks/ArtifactsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
[TaskName(nameof(ArtifactsTest))]
[TaskDescription("Tests packages in docker container")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[IsDependentOn(typeof(ArtifactsNativeTest))]
[IsDependentOn(typeof(ArtifactsDotnetToolTest))]
Expand Down
9 changes: 2 additions & 7 deletions build/build/Tasks/Test/UnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Build.Tasks;

[TaskName(nameof(UnitTest))]
[TaskDescription("Run the unit tests")]
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion50, Constants.NetVersion60, Constants.CoreFxVersion31, Constants.FullFxVersion48)]
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31)]
[IsDependentOn(typeof(Build))]
public class UnitTest : FrostingTask<BuildContext>
{
Expand All @@ -17,7 +17,7 @@ public class UnitTest : FrostingTask<BuildContext>
public override void Run(BuildContext context)
{
var dotnetTarget = context.Argument(Arguments.DotnetTarget, string.Empty);
var frameworks = new[] { Constants.CoreFxVersion31, Constants.FullFxVersion48, Constants.NetVersion50, Constants.NetVersion60 };
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
if (!string.IsNullOrWhiteSpace(dotnetTarget))
{
if (!frameworks.Contains(dotnetTarget, StringComparer.OrdinalIgnoreCase))
Expand Down Expand Up @@ -87,11 +87,6 @@ private static void TestProjectForTarget(BuildContext context, FilePath project,
Exclude = new List<string> { "[GitVersion*.Tests]*", "[GitTools.Testing]*" }
};

if (string.Equals(framework, Constants.FullFxVersion48))
{
settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}";
}

context.DotNetTest(project.FullPath, settings, coverletSettings);
}
}
8 changes: 1 addition & 7 deletions build/common/Utilities/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ public class Constants
public const string Repository = "GitVersion";

public const string Version60 = "6.0";
public const string Version50 = "5.0";
public const string Version31 = "3.1";

public const string NetVersion50 = "net5.0";
public const string NetVersion60 = "net6.0";
public const string CoreFxVersion31 = "netcoreapp3.1";
public const string FullFxVersion48 = "net48";

public const string NoMono = "NoMono";
public const string NoNet48 = "NoNet48";

public static readonly string[] VersionsToBuild = { Version60, Version50, Version31 };
public static readonly string[] VersionsToBuild = { Version60, Version31 };
public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 };
public static readonly string[] DistrosToSkip = { Alpine312, Alpine313, Alpine314, Centos7 };

Expand Down
2 changes: 1 addition & 1 deletion build/common/Utilities/DockerContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private static IEnumerable<string> GetDockerTags(this BuildContextBase context,
$"{name}:{context.Version.SemVersion}-{distro}-{targetFramework}",
};

if (distro == Constants.DockerDistroLatest && targetFramework == Constants.Version50)
if (distro == Constants.DockerDistroLatest && targetFramework == Constants.Version60)
{
tags.AddRange(new[]
{
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Tasks/DockerBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Docker.Tasks;
[TaskName(nameof(DockerBuild))]
[TaskDescription("Build the docker images containing the GitVersion Tool")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
public class DockerBuild : FrostingTask<BuildContext>
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Tasks/DockerManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Docker.Tasks;
[TaskName(nameof(DockerManifest))]
[TaskDescription("Publish the docker manifest containing the images for amd64 and arm64")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[IsDependentOn(typeof(DockerManifestInternal))]
public class DockerManifest : FrostingTask<BuildContext>
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Tasks/DockerPublish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Docker.Tasks;
[TaskName(nameof(DockerPublish))]
[TaskDescription("Publish the docker images containing the GitVersion Tool")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
[IsDependentOn(typeof(DockerPublishInternal))]
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Tasks/DockerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Docker.Tasks;
[TaskName(nameof(DockerTest))]
[TaskDescription("Test the docker images containing the GitVersion Tool")]
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version50, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
[IsDependentOn(typeof(DockerBuild))]
Expand Down
2 changes: 2 additions & 0 deletions docs/input/docs/learn/who.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ that we know about today.
* [ChocolateyGUI](https://github.com/chocolatey/ChocolateyGUI)
* [GitLink](https://github.com/GitTools/GitLink)
* [OctopusDeploy](https://github.com/OctopusDeploy)
* [NUKE](https://nuke.build)
* [Orc.\* packages](https://github.com/wildgums?query=orc)
* [Orchestra](https://github.com/wildgums/orchestra)
* [Pomona](http://pomona.io/)
Expand All @@ -20,6 +21,7 @@ that we know about today.
* [Splat](https://github.com/paulcbetts/splat)
* [ReactiveUI](https://github.com/reactiveui/reactiveui)
* [Uno Platform](https://platform.uno/)
* [Fluent Assertions](https://fluentassertions.com)

If you are using GitVersion in your projects, and you are not listed above,
please feel free to add a link to your project.
4 changes: 0 additions & 4 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
<None Include="../../build/nuspec/README.md" Pack="true" PackagePath="/"/>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
</ItemGroup>

<!-- Workaround to enable .editorconfig based analyzer configuration until dotnet compilers support .editorconfig based configuration -->
<PropertyGroup>
<SkipDefaultEditorConfigAsAdditionalFile>true</SkipDefaultEditorConfigAsAdditionalFile>
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void WorkingDirectoryWithoutCommitsFailsWithInformativeMessage()
public void WorkingDirectoryDoesNotExistFailsWithInformativeMessage()
{
var workingDirectory = PathHelper.Combine(ExecutableHelper.GetCurrentDirectory(), Guid.NewGuid().ToString("N"));
var executable = ExecutableHelper.GetExecutable();
var executable = ExecutableHelper.GetDotNetExecutable();

var output = new StringBuilder();
var args = ExecutableHelper.GetExecutableArgs($" /targetpath {workingDirectory} ");
Expand Down
3 changes: 1 addition & 2 deletions src/GitVersion.App.Tests/GitVersion.App.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net48;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>

<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand All @@ -21,7 +21,6 @@
<ItemGroup>
<Compile Include="..\GitVersion.Core.Tests\Helpers\DirectoryHelper.cs" Link="Helpers\DirectoryHelper.cs" />
<Compile Include="..\GitVersion.Core.Tests\Helpers\ExecutableHelper.cs" Link="Helpers\ExecutableHelper.cs" />
<Compile Include="..\GitVersion.Core.Tests\Helpers\RuntimeHelper.cs" Link="Helpers\RuntimeHelper.cs" />
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestEffectiveConfiguration.cs" Link="Helpers\TestEffectiveConfiguration.cs" />
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestEnvironment.cs" Link="Helpers\TestEnvironment.cs" />
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestFileSystem.cs" Link="Helpers\TestFileSystem.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static ExecutionResults ExecuteIn(ArgumentBuilder arguments,
params KeyValuePair<string, string?>[] environments
)
{
var executable = ExecutableHelper.GetExecutable();
var executable = ExecutableHelper.GetDotNetExecutable();
var output = new StringBuilder();

var environmentalVariables = new Dictionary<string, string?>
Expand Down
11 changes: 1 addition & 10 deletions src/GitVersion.App/GitVersion.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
<OutputType>Exe</OutputType>
<RootNamespace>GitVersion</RootNamespace>
<AssemblyName>gitversion</AssemblyName>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition=" '$(PackAsTool)' != 'true'">
<TargetFrameworks>net48;$(TargetFrameworks);</TargetFrameworks>
</PropertyGroup>

<!-- workaround for https://github.com/dotnet/runtime/issues/49508 -->
<PropertyGroup Condition=" '$(OsxArm64)' == 'true'">
<TargetFrameworks>net6.0</TargetFrameworks>
Expand All @@ -25,11 +21,6 @@
<PackageDescription>Derives SemVer information from a repository following GitFlow or GitHubFlow. This is the .NET Core Global Tool allowing usage of GitVersion from command line.</PackageDescription>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net48'">
<PackageReference Include="JetBrains.Annotations" Version="$(PackageVersion_JetBrainsAnnotations)" />
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="$(PackageVersion_LibGit2Sharp_NativeBinaries)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="$(PackageVersion_MicrosoftJson)" />
<PackageReference Include="System.Text.Encodings.Web" Version="$(PackageVersion_MicrosoftJson)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ public void NextVersionCanHavePatch()

[Test]
[MethodImpl(MethodImplOptions.NoInlining)]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CanWriteOutEffectiveConfiguration()
{
var config = this.configProvider.Provide(this.repoPath);
Expand Down
2 changes: 0 additions & 2 deletions src/GitVersion.Core.Tests/Configuration/Init/InitScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ public class InitScenarios : TestBase
public void Setup() => ShouldlyConfiguration.ShouldMatchApprovedDefaults.LocateTestMethodUsingAttribute<TestAttribute>();

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CanSetNextVersion()
{
var workingDirectory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "c:\\proj" : "/proj";
Expand Down
12 changes: 0 additions & 12 deletions src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public void GitPreparerShouldNotFailWhenTargetPathNotInitialized()
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CacheKeyForWorktree()
{
using var fixture = new EmptyRepositoryFixture();
Expand Down Expand Up @@ -411,8 +409,6 @@ public void WorkingDirectoryWithoutCommits()
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void GetProjectRootDirectoryWorkingDirectoryWithWorktree()
{
using var fixture = new EmptyRepositoryFixture();
Expand Down Expand Up @@ -480,8 +476,6 @@ public void GetDotGitDirectoryNoWorktree()
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void GetDotGitDirectoryWorktree()
{
using var fixture = new EmptyRepositoryFixture();
Expand Down Expand Up @@ -512,8 +506,6 @@ public void GetDotGitDirectoryWorktree()
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CalculateVersionFromWorktreeHead()
{
// Setup
Expand Down Expand Up @@ -543,8 +535,6 @@ public void CalculateVersionFromWorktreeHead()
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndNotTagged_ThrowException()
{
// Setup
Expand All @@ -571,8 +561,6 @@ public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndNotTa
}

[Test]
[Category(NoMono)]
[Description(NoMonoDescription)]
public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndTagged_ReturnSemver()
{
// Setup
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net48;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>

<DebugType>full</DebugType>
<Optimize>false</Optimize>
Expand Down
7 changes: 2 additions & 5 deletions src/GitVersion.Core.Tests/Helpers/ExecutableHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ public static class ExecutableHelper
{
public static string GetCurrentDirectory() => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? throw new InvalidOperationException();

public static string GetExecutable() => RuntimeHelper.IsCoreClr() ? "dotnet" : PathHelper.Combine(GetExeDirectory(), "gitversion.exe");
public static string GetDotNetExecutable() => "dotnet";

public static string GetExecutableArgs(string args)
{
if (RuntimeHelper.IsCoreClr())
{
args = $"{PathHelper.Combine(GetExeDirectory(), "gitversion.dll")} {args}";
}
args = $"{PathHelper.Combine(GetExeDirectory(), "gitversion.dll")} {args}";
return args;
}

Expand Down
Loading