Skip to content

Commit e602427

Browse files
committed
#3166 - drop .net core 3.1 support
1 parent 9d66835 commit e602427

26 files changed

+43
-113
lines changed

.github/mergify.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ pull_request_rules:
1111
- '#commits-behind=0' # Only merge up to date pull requests
1212
- check-success=DotNet Format
1313
- check-success=Release
14-
- check-success=Unit Test code (windows-latest, netcoreapp3.1)
15-
- check-success=Unit Test code (ubuntu-latest, netcoreapp3.1)
16-
- check-success=Unit Test code (macos-latest, netcoreapp3.1)
17-
- check-success=Unit Test code (windows-latest, net5.0)
18-
- check-success=Unit Test code (windows-latest, net5.0)
19-
- check-success=Unit Test code (windows-latest, net5.0)
14+
- check-success=Unit Test code (windows-latest, net6.0)
15+
- check-success=Unit Test code (windows-latest, net6.0)
16+
- check-success=Unit Test code (windows-latest, net6.0)
2017
- repository-full-name=GitTools/GitVersion # Don't auto-merge PRs in forks
2118
actions:
2219
merge:

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,7 @@ jobs:
133133
strategy:
134134
matrix:
135135
os: [windows-latest, ubuntu-latest, macos-latest]
136-
targetFramework: [net6.0, netcoreapp3.1]
137-
exclude:
138-
- os: macos-latest
139-
targetFramework: netcoreapp3.1
136+
targetFramework: [net6.0]
140137
fail-fast: false
141138

142139
steps:
@@ -227,7 +224,7 @@ jobs:
227224
runs-on: ubuntu-latest
228225
strategy:
229226
matrix:
230-
targetFramework: [ '3.1', '6.0' ]
227+
targetFramework: [ '6.0' ]
231228
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, ubuntu.22.04 ]
232229
fail-fast: false
233230

@@ -291,7 +288,7 @@ jobs:
291288
runs-on: ubuntu-latest
292289
strategy:
293290
matrix:
294-
targetFramework: [ '3.1', '6.0' ]
291+
targetFramework: [ '6.0' ]
295292
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, ubuntu.22.04 ]
296293
fail-fast: false
297294

build/.run/Default Artifacts.run.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Default Artifacts" type="DotNetProject" factoryName=".NET Project" folderName="Default">
3-
<option name="EXE_PATH" value="$PROJECT_DIR$/../run/artifacts-test.exe" />
3+
<option name="EXE_PATH" value="$PROJECT_DIR$/../run/artifacts.exe" />
44
<option name="PROGRAM_PARAMETERS" value="" />
55
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/.." />
66
<option name="PASS_PARENT_ENVS" value="1" />
@@ -17,4 +17,4 @@
1717
<option name="Build" />
1818
</method>
1919
</configuration>
20-
</component>
20+
</component>

build/.run/UnitTest (3.1).run.xml

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

build/.run/UnitTest (4.8).run.xml

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

build/artifacts/Tasks/ArtifactsDotnetToolTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsDotnetToolTest))]
66
[TaskDescription("Tests the dotnet global tool in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsDotnetToolTest : FrostingTask<BuildContext>

build/artifacts/Tasks/ArtifactsMsBuildCoreTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsMsBuildCoreTest))]
66
[TaskDescription("Tests the msbuild package in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsMsBuildCoreTest : FrostingTask<BuildContext>
@@ -32,10 +32,8 @@ public override void Run(BuildContext context)
3232
string distro = dockerImage.Distro;
3333
string targetFramework = dockerImage.TargetFramework;
3434

35-
if (targetFramework == Constants.Version31 && distro == Constants.Centos8) continue; // TODO check why this one fails
3635
targetFramework = targetFramework switch
3736
{
38-
Constants.Version31 => $"netcoreapp{targetFramework}",
3937
Constants.Version60 => $"net{targetFramework}",
4038
_ => targetFramework
4139
};

build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public override void Run(BuildContext context)
2323
var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath;
2424

2525
context.Information("\nTesting msbuild task with dotnet build (for .net core)\n");
26-
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
26+
var frameworks = new[] { Constants.NetVersion60 };
2727
foreach (var framework in frameworks)
2828
{
2929
var dotnetMsBuildSettings = new DotNetMSBuildSettings();

build/artifacts/Tasks/ArtifactsNativeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsNativeTest))]
66
[TaskDescription("Tests the native executables in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsNativeTest : FrostingTask<BuildContext>

build/artifacts/Tasks/ArtifactsPrepare.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsPrepare))]
66
[TaskDescription("Pulls the docker images needed for testing the artifacts")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
public class ArtifactsPrepare : FrostingTask<BuildContext>
1111
{

build/artifacts/Tasks/ArtifactsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsTest))]
66
[TaskDescription("Tests packages in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsNativeTest))]
1111
[IsDependentOn(typeof(ArtifactsDotnetToolTest))]

build/build/Tasks/Test/UnitTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Build.Tasks;
88

99
[TaskName(nameof(UnitTest))]
1010
[TaskDescription("Run the unit tests")]
11-
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31)]
11+
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60)]
1212
[IsDependentOn(typeof(Build))]
1313
public class UnitTest : FrostingTask<BuildContext>
1414
{
@@ -17,7 +17,7 @@ public class UnitTest : FrostingTask<BuildContext>
1717
public override void Run(BuildContext context)
1818
{
1919
var dotnetTarget = context.Argument(Arguments.DotnetTarget, string.Empty);
20-
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
20+
var frameworks = new[] { Constants.NetVersion60 };
2121
if (!string.IsNullOrWhiteSpace(dotnetTarget))
2222
{
2323
if (!frameworks.Contains(dotnetTarget, StringComparer.OrdinalIgnoreCase))

build/common/Utilities/Constants.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ public class Constants
66
public const string Repository = "GitVersion";
77

88
public const string Version60 = "6.0";
9-
public const string Version31 = "3.1";
109

1110
public const string NetVersion60 = "net6.0";
12-
public const string CoreFxVersion31 = "netcoreapp3.1";
1311

14-
public static readonly string[] VersionsToBuild = { Version60, Version31 };
12+
public static readonly string[] VersionsToBuild = { Version60 };
1513
public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 };
1614
public static readonly string[] DistrosToSkip = { Alpine312, Alpine313, Alpine314, Centos7 };
1715

build/common/Utilities/DockerContextExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ public static bool SkipImage(this ICakeContext context, DockerImage dockerImage)
1313
{
1414
var (distro, targetFramework, architecture, _, _) = dockerImage;
1515

16-
// TODO skip this because of https://github.com/GitTools/GitVersion/pull/3148, remove after .net core 3.1 is removed
17-
if (distro == Constants.Ubuntu2204 && targetFramework == Constants.Version31) return true;
18-
1916
if (architecture != Architecture.Arm64) return false;
2017
if (!Constants.DistrosToSkip.Contains(distro)) return false;
2118

build/docker/Tasks/DockerBuild.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Docker.Tasks;
55
[TaskName(nameof(DockerBuild))]
66
[TaskDescription("Build the docker images containing the GitVersion Tool")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
1111
public class DockerBuild : FrostingTask<BuildContext>

build/docker/Tasks/DockerManifest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Docker.Tasks;
55
[TaskName(nameof(DockerManifest))]
66
[TaskDescription("Publish the docker manifest containing the images for amd64 and arm64")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(DockerManifestInternal))]
1111
public class DockerManifest : FrostingTask<BuildContext>
@@ -44,9 +44,6 @@ public override void Run(BuildContext context)
4444
{
4545
foreach (var group in context.Images.GroupBy(x => new { x.Distro, x.TargetFramework }))
4646
{
47-
// TODO skip this because of https://github.com/GitTools/GitVersion/pull/3148, remove after .net core 3.1 is removed
48-
if (group.Key.Distro == Constants.Ubuntu2204 && group.Key.TargetFramework == Constants.Version31) continue;
49-
5047
var amd64DockerImage = group.First(x => x.Architecture == Architecture.Amd64);
5148
var arm64DockerImage = group.First(x => x.Architecture == Architecture.Arm64);
5249
context.DockerCreateManifest(amd64DockerImage, context.SkipImage(arm64DockerImage));

build/docker/Tasks/DockerPublish.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Docker.Tasks;
55
[TaskName(nameof(DockerPublish))]
66
[TaskDescription("Publish the docker images containing the GitVersion Tool")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
1111
[IsDependentOn(typeof(DockerPublishInternal))]

build/docker/Tasks/DockerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Docker.Tasks;
55
[TaskName(nameof(DockerTest))]
66
[TaskDescription("Test the docker images containing the GitVersion Tool")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[TaskArgument(Arguments.Architecture, Constants.Amd64, Constants.Arm64)]
1111
[IsDependentOn(typeof(DockerBuild))]

src/GitVersion.App.Tests/GitVersion.App.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0</TargetFrameworks>
44

55
<IsTestProject>true</IsTestProject>
66
</PropertyGroup>

src/GitVersion.App/GitVersion.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<RootNamespace>GitVersion</RootNamespace>
66
<AssemblyName>gitversion</AssemblyName>
7-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
7+
<TargetFrameworks>net6.0</TargetFrameworks>
88
<PlatformTarget>AnyCPU</PlatformTarget>
99
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1010
</PropertyGroup>

src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0</TargetFrameworks>
55

66
<DebugType>full</DebugType>
77
<Optimize>false</Optimize>

0 commit comments

Comments
 (0)