Skip to content

Commit c22c87a

Browse files
authored
Merge branch 'main' into dependabot/nuget/LibGit2Sharp-0.27.0-preview-0182
2 parents 3250a64 + 429d339 commit c22c87a

File tree

47 files changed

+78
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+78
-318
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ env:
3232

3333
permissions:
3434
contents: read
35-
35+
packages: write
36+
3637
jobs:
3738
prepare:
3839
name: Prepare Build
@@ -132,7 +133,7 @@ jobs:
132133
strategy:
133134
matrix:
134135
os: [windows-latest, ubuntu-latest, macos-latest]
135-
targetFramework: [net48, net5.0, net6.0, netcoreapp3.1]
136+
targetFramework: [net6.0, netcoreapp3.1]
136137
fail-fast: false
137138

138139
steps:
@@ -216,7 +217,7 @@ jobs:
216217
runs-on: ubuntu-latest
217218
strategy:
218219
matrix:
219-
targetFramework: [ '3.1', '5.0', '6.0' ]
220+
targetFramework: [ '3.1', '6.0' ]
220221
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 ]
221222
fail-fast: false
222223

@@ -280,7 +281,7 @@ jobs:
280281
runs-on: ubuntu-latest
281282
strategy:
282283
matrix:
283-
targetFramework: [ '3.1', '5.0', '6.0' ]
284+
targetFramework: [ '3.1', '6.0' ]
284285
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 ]
285286
fail-fast: false
286287

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.Version50, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
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 & 2 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.Version50, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine312, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsMsBuildCoreTest : FrostingTask<BuildContext>
@@ -36,7 +36,6 @@ public override void Run(BuildContext context)
3636
targetFramework = targetFramework switch
3737
{
3838
Constants.Version31 => $"netcoreapp{targetFramework}",
39-
Constants.Version50 => $"net{targetFramework}",
4039
Constants.Version60 => $"net{targetFramework}",
4140
_ => targetFramework
4241
};

build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs

Lines changed: 1 addition & 17 deletions
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.NetVersion50, Constants.NetVersion60 };
26+
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
2727
foreach (var framework in frameworks)
2828
{
2929
var dotnetMsBuildSettings = new DotNetMSBuildSettings();
@@ -43,21 +43,5 @@ public override void Run(BuildContext context)
4343
var netcoreExe = Paths.Integration.Combine("core").Combine("build").Combine(framework).CombineWithFilePath("app.dll");
4444
context.ValidateOutput("dotnet", netcoreExe.FullPath, context.Version.GitVersion.FullSemVer);
4545
}
46-
47-
context.Information("\nTesting msbuild task with msbuild (for full framework)\n");
48-
49-
var msBuildSettings = new MSBuildSettings
50-
{
51-
Verbosity = Verbosity.Minimal,
52-
Restore = true
53-
};
54-
55-
msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
56-
msBuildSettings.WithProperty("RestoreSource", nugetSource);
57-
58-
context.MSBuild("./tests/integration/full", msBuildSettings);
59-
60-
var fullExe = Paths.Integration.Combine("full").Combine("build").CombineWithFilePath("app.exe");
61-
context.ValidateOutput(fullExe.FullPath, null, context.Version.GitVersion.FullSemVer);
6246
}
6347
}

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.Version50, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
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.Version50, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
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.Version50, Constants.Version60, Constants.Version31)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version31)]
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 & 7 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.NetVersion50, Constants.NetVersion60, Constants.CoreFxVersion31, Constants.FullFxVersion48)]
11+
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31)]
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.FullFxVersion48, Constants.NetVersion50, Constants.NetVersion60 };
20+
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
2121
if (!string.IsNullOrWhiteSpace(dotnetTarget))
2222
{
2323
if (!frameworks.Contains(dotnetTarget, StringComparer.OrdinalIgnoreCase))
@@ -87,11 +87,6 @@ private static void TestProjectForTarget(BuildContext context, FilePath project,
8787
Exclude = new List<string> { "[GitVersion*.Tests]*", "[GitTools.Testing]*" }
8888
};
8989

90-
if (string.Equals(framework, Constants.FullFxVersion48))
91-
{
92-
settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}";
93-
}
94-
9590
context.DotNetTest(project.FullPath, settings, coverletSettings);
9691
}
9792
}

build/common/Utilities/Constants.cs

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

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

12-
public const string NetVersion50 = "net5.0";
1311
public const string NetVersion60 = "net6.0";
1412
public const string CoreFxVersion31 = "netcoreapp3.1";
15-
public const string FullFxVersion48 = "net48";
1613

17-
public const string NoMono = "NoMono";
18-
public const string NoNet48 = "NoNet48";
19-
20-
public static readonly string[] VersionsToBuild = { Version60, Version50, Version31 };
14+
public static readonly string[] VersionsToBuild = { Version60, Version31 };
2115
public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 };
2216
public static readonly string[] DistrosToSkip = { Alpine312, Alpine313, Alpine314, Centos7 };
2317

build/common/Utilities/DockerContextExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private static IEnumerable<string> GetDockerTags(this BuildContextBase context,
158158
$"{name}:{context.Version.SemVersion}-{distro}-{targetFramework}",
159159
};
160160

161-
if (distro == Constants.DockerDistroLatest && targetFramework == Constants.Version50)
161+
if (distro == Constants.DockerDistroLatest && targetFramework == Constants.Version60)
162162
{
163163
tags.AddRange(new[]
164164
{

0 commit comments

Comments
 (0)