Skip to content

Commit f921fc6

Browse files
author
Jason Zhai
committed
Merge branch 'release/7.0.4xx'
2 parents 8a117f6 + fd967f5 commit f921fc6

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/Containers/Microsoft.NET.Build.Containers/Tasks/ComputeDotnetBaseImageTag.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public override bool Execute()
7777
}
7878

7979
private string? DetermineLabelBasedOnChannel(int major, int minor, string[] releaseLabels) {
80-
// this would be a switch, but we have to support net47s where Range and Index aren't available
80+
// this would be a switch, but we have to support net47x where Range and Index aren't available
8181
if (releaseLabels.Length == 0)
8282
{
8383
return $"{major}.{minor}";
@@ -89,19 +89,17 @@ public override bool Execute()
8989
{
9090
if (releaseLabels.Length > 1)
9191
{
92-
return $"{major}.{minor}-{channel}.{releaseLabels[1]}";
92+
// Per the dotnet-docker team, the major.minor preview tag format is a fluke and the major.minor.0 form
93+
// should be used for all previews going forward.
94+
return $"{major}.{minor}.0-{channel}.{releaseLabels[1]}";
9395
}
9496
else
9597
{
9698
Log.LogError(Resources.Strings.InvalidSdkPrereleaseVersion, channel);
9799
return null;
98100
}
99101
}
100-
else if (channel == "alpha")
101-
{
102-
return $"{major}.{minor}-preview.1";
103-
}
104-
else if (channel == "dev" || channel == "ci")
102+
else if (channel == "alpha" || channel == "dev" || channel == "ci")
105103
{
106104
return $"{major}.{minor}-preview";
107105
}

src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ internal async Task<bool> ExecuteAsync(CancellationToken cancellationToken)
144144
{
145145
if (BuildEngine != null)
146146
{
147-
Log.LogErrorWithCodeFromResources(nameof(Strings.RegistryOutputPushFailed), e);
147+
Log.LogErrorWithCodeFromResources(nameof(Strings.RegistryOutputPushFailed), e.Message);
148+
Log.LogMessage(MessageImportance.Low, "Details: {0}", e);
148149
}
149150
}
150151
}

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public void ShouldNotIncludeSourceControlLabelsUnlessUserOptsIn(bool includeSour
131131
[InlineData("7.0.100-rc.1", "v7.0", "7.0")]
132132
[InlineData("8.0.100", "v8.0", "8.0")]
133133
[InlineData("8.0.100", "v7.0", "7.0")]
134-
[InlineData("8.0.100-preview.7", "v8.0", "8.0-preview.7")]
135-
[InlineData("8.0.100-rc.1", "v8.0", "8.0-rc.1")]
134+
[InlineData("8.0.100-preview.7", "v8.0", "8.0.0-preview.7")]
135+
[InlineData("8.0.100-rc.1", "v8.0", "8.0.0-rc.1")]
136136
[InlineData("8.0.100-rc.1", "v7.0", "7.0")]
137137
[InlineData("8.0.200", "v8.0", "8.0")]
138138
[InlineData("8.0.200", "v7.0", "7.0")]
@@ -142,8 +142,8 @@ public void ShouldNotIncludeSourceControlLabelsUnlessUserOptsIn(bool includeSour
142142
[InlineData("6.0.100-preview.1", "v6.0", "6.0")]
143143
[InlineData("8.0.100-dev", "v8.0", "8.0-preview")]
144144
[InlineData("8.0.100-ci", "v8.0", "8.0-preview")]
145-
[InlineData("8.0.100-alpha.12345", "v8.0", "8.0-preview.1")]
146-
[InlineData("9.0.100-alpha.12345", "v9.0", "9.0-preview.1")]
145+
[InlineData("8.0.100-alpha.12345", "v8.0", "8.0-preview")]
146+
[InlineData("9.0.100-alpha.12345", "v9.0", "9.0-preview")]
147147
[Theory]
148148
public void CanComputeTagsForSupportedSDKVersions(string sdkVersion, string tfm, string expectedTag)
149149
{

0 commit comments

Comments
 (0)