Skip to content

Commit 786a159

Browse files
committed
#4078 - update publishing docker images
publish docker image with MajorMinorPatch only on Stable releases
1 parent 9d7452d commit 786a159

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build/common/Utilities/DockerContextExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,13 @@ private static IEnumerable<string> GetDockerTags(this BuildContextBase context,
211211

212212
if (distro == Constants.DockerDistroLatest && targetFramework == Constants.VersionLatest)
213213
{
214-
tags.AddRange(new[] { $"{name}:{context.Version.Version}", $"{name}:{context.Version.SemVersion}", });
214+
tags.Add($"{name}:{context.Version.SemVersion}");
215215

216216
if (context.IsStableRelease)
217217
{
218218
tags.AddRange(
219219
[
220+
$"{name}:{context.Version.Version}",
220221
$"{name}:latest",
221222
$"{name}:latest-{targetFramework}",
222223
$"{name}:latest-{distro}",

build/common/Utilities/Models.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static BuildVersion Calculate(GitVersion gitVersion)
4040
nugetVersion += $".{gitVersion.BuildMetaData}";
4141
}
4242

43-
return new BuildVersion(
43+
return new(
4444
GitVersion: gitVersion,
4545
Version: version,
4646
Milestone: semVersion,

0 commit comments

Comments
 (0)