From 14cc5bc5c46bc38d0fdc43f9397d4cae3d280b87 Mon Sep 17 00:00:00 2001 From: Sridhar Periyasamy Date: Thu, 17 Mar 2016 22:22:22 -0700 Subject: [PATCH] Publish the correct .version file to azure. --- scripts/dotnet-cli-build/PublishTargets.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/dotnet-cli-build/PublishTargets.cs b/scripts/dotnet-cli-build/PublishTargets.cs index b57ed91fa..e9623e385 100644 --- a/scripts/dotnet-cli-build/PublishTargets.cs +++ b/scripts/dotnet-cli-build/PublishTargets.cs @@ -18,6 +18,8 @@ namespace Microsoft.DotNet.Cli.Build private static string Version { get; set; } + private static string NuGetVersion { get; set; } + [Target] public static BuildTargetResult InitPublish(BuildTargetContext c) @@ -27,6 +29,7 @@ namespace Microsoft.DotNet.Cli.Build BlobContainer = blobClient.GetContainerReference("dotnet"); Version = c.BuildContext.Get("BuildVersion").SimpleVersion; + NuGetVersion = c.BuildContext.Get("BuildVersion").NuGetVersion; Channel = c.BuildContext.Get("Channel"); return c.Success(); } @@ -83,7 +86,7 @@ namespace Microsoft.DotNet.Cli.Build { var osname = Monikers.GetOSShortName(); var latestVersionBlob = $"{Channel}/dnvm/latest.{osname}.{CurrentArchitecture.Current}.version"; - var latestVersionFile = Path.Combine(Dirs.Stage2, ".version"); + var latestVersionFile = Path.Combine(Dirs.Stage2, "sdk", NuGetVersion, ".version"); PublishFileAzure(latestVersionBlob, latestVersionFile); return c.Success();