Merge pull request #5813 from livarcocc/update_sdk

Adding the SDK version to the hash of the lzma archive and update SDK version
This commit is contained in:
Livar 2017-02-23 21:42:00 -08:00 committed by GitHub
commit ca4d0b8fbb
4 changed files with 7 additions and 14 deletions

View file

@ -4,7 +4,7 @@
<CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion> <CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.1.548</CLI_MSBuild_Version> <CLI_MSBuild_Version>15.1.548</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
<CLI_NETSDK_Version>1.0.0-alpha-20170217-2</CLI_NETSDK_Version> <CLI_NETSDK_Version>1.0.0-alpha-20170222-1</CLI_NETSDK_Version>
<CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version> <CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version>
<CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version> <CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.0.0</CLI_TestPlatform_Version> <CLI_TestPlatform_Version>15.0.0</CLI_TestPlatform_Version>

View file

@ -120,7 +120,7 @@
<Target Name="SetupNuGetPackagesArchiveInputsOutputs" <Target Name="SetupNuGetPackagesArchiveInputsOutputs"
DependsOnTargets="Prepare;SetupStage;SetupAzureBlobInformation"> DependsOnTargets="Prepare;SetupStage;SetupAzureBlobInformation">
<GenerateNuGetPackagesArchiveVersion ToolPath="$(Stage2Directory)"> <GenerateNuGetPackagesArchiveVersion ToolPath="$(Stage2Directory)" SDKVersion="$(CLI_NETSDK_Version)">
<Output TaskParameter="Version" PropertyName="NuGetPackagesArchiveVersion"/> <Output TaskParameter="Version" PropertyName="NuGetPackagesArchiveVersion"/>
</GenerateNuGetPackagesArchiveVersion> </GenerateNuGetPackagesArchiveVersion>
<PropertyGroup> <PropertyGroup>

View file

@ -18,6 +18,9 @@ namespace Microsoft.DotNet.Cli.Build
{ {
} }
[Required]
public string SDKVersion { get; set; }
[Required] [Required]
public string ToolPath { get; set; } public string ToolPath { get; set; }
@ -70,6 +73,8 @@ namespace Microsoft.DotNet.Cli.Build
Directory.Delete(targetDir, true); Directory.Delete(targetDir, true);
} }
dataToHash += SDKVersion;
Log.LogMessage($"NuGet Packages Archive Data To Hash: '{dataToHash}'"); Log.LogMessage($"NuGet Packages Archive Data To Hash: '{dataToHash}'");
var sha256 = SHA256.Create(); var sha256 = SHA256.Create();

View file

@ -28,7 +28,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact] [WindowsOnlyFact]
public void It_resolves_desktop_apps_defaulting_to_Debug_Configuration() public void It_resolves_desktop_apps_defaulting_to_Debug_Configuration()
{ {
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug"; var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
@ -38,14 +37,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var restoreCommand = new RestoreCommand() var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput() .ExecuteWithCapturedOutput()
.Should().Pass(); .Should().Pass();
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput() .WithCapturedOutput()
.Execute() .Execute()
.Should().Pass(); .Should().Pass();
@ -67,7 +64,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact] [WindowsOnlyFact]
public void It_resolves_desktop_apps_when_configuration_is_Debug() public void It_resolves_desktop_apps_when_configuration_is_Debug()
{ {
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug"; var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
@ -77,14 +73,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var restoreCommand = new RestoreCommand() var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput() .ExecuteWithCapturedOutput()
.Should().Pass(); .Should().Pass();
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.Execute() .Execute()
.Should().Pass(); .Should().Pass();
@ -104,7 +98,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact] [WindowsOnlyFact]
public void It_resolves_desktop_apps_when_configuration_is_Release() public void It_resolves_desktop_apps_when_configuration_is_Release()
{ {
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug"; var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
@ -114,14 +107,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var restoreCommand = new RestoreCommand() var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput() .ExecuteWithCapturedOutput()
.Should().Pass(); .Should().Pass();
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput() .WithCapturedOutput()
.Execute() .Execute()
.Should().Pass(); .Should().Pass();
@ -143,7 +134,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact] [WindowsOnlyFact]
public void It_resolves_desktop_apps_using_configuration_passed_to_create() public void It_resolves_desktop_apps_using_configuration_passed_to_create()
{ {
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug"; var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
@ -153,14 +143,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var restoreCommand = new RestoreCommand() var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput() .ExecuteWithCapturedOutput()
.Should().Pass(); .Should().Pass();
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput() .WithCapturedOutput()
.Execute() .Execute()
.Should().Pass(); .Should().Pass();