Set NETCoreAppMaximumVersion to the current version in the branch

This commit is contained in:
Wes Haggard 2017-10-27 13:11:11 -07:00
Родитель b46b5fa307
Коммит 3aa233dbd0
6 изменённых файлов: 29 добавлений и 18 удалений

Просмотреть файл

@ -11,5 +11,6 @@
<BranchName>master</BranchName>
<ContainerName>dotnet</ContainerName>
<ChecksumContainerName>$(ContainerName)</ChecksumContainerName>
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
</PropertyGroup>
</Project>

3
TestProjects.props Normal file
Просмотреть файл

@ -0,0 +1,3 @@
<Project>
<Import Project="BranchInfo.props" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<!-- Directory.Build.props imports this .props file, so ensure it isn't imported again -->
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
</PropertyGroup>
<!-- Define vNext UAP Moniker -->
<PropertyGroup>
<UAPvNextVersion>10.0.15138</UAPvNextVersion>
@ -24,7 +24,7 @@
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)BranchInfo.props" />
<PropertyGroup>
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
</PropertyGroup>
@ -51,7 +51,7 @@
https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
</RestoreSources>
</PropertyGroup>
<!-- Import Build tools common props file where repo-independent properties are found -->
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
@ -116,7 +116,7 @@
<ItemGroup>
<DotnetSourceList Include="$(RestoreSources)" />
</ItemGroup>
<!-- list of projects to perform batch restore -->
<ItemGroup>
<SdkRestoreProjects Include="$(MSBuildThisFileDirectory)src\pkg\deps\deps.csproj" />
@ -284,7 +284,7 @@
<SharedHostInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(SharedHostInstallerStart)$(InstallerStartSuffix)-</SharedHostInstallerStart>
<HostFxrInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(HostFxrInstallerStart)$(InstallerStartSuffix)-</HostFxrInstallerStart>
<SharedFrameworkInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(SharedFrameworkInstallerStart)$(InstallerStartSuffix)-</SharedFrameworkInstallerStart>
</PropertyGroup>
<!-- Set up handling of build warnings -->
@ -418,7 +418,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Never use the NuGet fallback folder that comes with the SDK we use to build.
<!-- Never use the NuGet fallback folder that comes with the SDK we use to build.
The NuGet fallback folder can/will contain packages we are building in this repo, and we
want to ensure we use the correct packages.
-->
@ -426,14 +426,14 @@
</PropertyGroup>
<PropertyGroup>
<!-- These properties should be passed through to new msbuild instances (like 'dotnet build')
<!-- These properties should be passed through to new msbuild instances (like 'dotnet build')
in order to get the correct output directories in the child project.
-->
<MSBuildPassThroughPropertyList>/p:OSGroup=$(OSGroup) /p:PortableBuild=$(PortableBuild) /p:TargetArchitecture=$(TargetArchitecture) /p:ConfigurationGroup=$(ConfigurationGroup)</MSBuildPassThroughPropertyList>
<MSBuildPassThroughPropertyList Condition="'$(OutputRid)' != ''">$(MSBuildPassThroughPropertyList) /p:OutputRid=$(OutputRid)</MSBuildPassThroughPropertyList>
</PropertyGroup>
<!-- Use Roslyn Compilers to build, if we are not using the .NET SDK to build -->
<Import Project="$(RoslynPropsFile)" Condition="'$(UsingNETSdkCompiler)' != 'true' and '$(OsEnvironment)'!='Windows_NT' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(UsingNETSdkCompiler)' != 'true' and '$(OsEnvironment)'=='Windows_NT' and Exists('$(RoslynPropsFile)')" />
<!-- Use Roslyn Compilers to build, if we are not using the .NET SDK to build -->
<Import Project="$(RoslynPropsFile)" Condition="'$(UsingNETSdkCompiler)' != 'true' and '$(OsEnvironment)'!='Windows_NT' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(UsingNETSdkCompiler)' != 'true' and '$(OsEnvironment)'=='Windows_NT' and Exists('$(RoslynPropsFile)')" />
</Project>

Просмотреть файл

@ -46,7 +46,7 @@ namespace Microsoft.DotNet.CoreSetup.Test
_repoRoot = repoRoot ?? GetRepoRootDirectory();
string baseArtifactsFolder = artifacts ?? Path.Combine(_repoRoot, "Bin");
_targetRID = Environment.GetEnvironmentVariable("TEST_TARGETRID");
_buildRID = Environment.GetEnvironmentVariable("BUILDRID");
_buildArchitecture = Environment.GetEnvironmentVariable("BUILD_ARCHITECTURE");

Просмотреть файл

@ -2,6 +2,7 @@ using Microsoft.DotNet.Cli.Build;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Microsoft.DotNet.CoreSetup.Test
{
@ -162,9 +163,15 @@ namespace Microsoft.DotNet.CoreSetup.Test
{
try
{
StringBuilder propsFile = new StringBuilder();
propsFile.AppendLine("<Project>");
propsFile.AppendLine(" <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), TestProjects.props))\\TestProjects.props\" />");
propsFile.AppendLine("</Project>");
// write an empty Directory.Build.props to ensure that msbuild doesn't pick up
// the repo's root Directory.Build.props.
File.WriteAllText(directoryBuildPropsPath, "<Project></Project>");
File.WriteAllText(directoryBuildPropsPath, propsFile.ToString());
}
catch (IOException)
{}

Просмотреть файл

@ -13,7 +13,7 @@
</PropertyGroup>
<Target Name="Build" DependsOnTargets="$(BuildTestTargets)" />
<Target Name="DetermineTestOutputDirectory">
<GetTargetMachineInfo>
<Output TaskParameter="RuntimeIdentifier" PropertyName="_HostRid" />
@ -37,7 +37,7 @@
<ItemGroup>
<DirsToClean Include="$(TestDir)\**\bin" />
<DirsToClean Include="$(TestDir)\**\obj" />
<DirsToClean Include="$(TempFolderRoot)$(TargetArchitecture)" />
<DirsToClean Include="$(TempFolderRoot)$(TargetArchitecture)" />
</ItemGroup>
<RemoveDir Directories="@(DirsToClean)" />
@ -79,9 +79,9 @@
<TestWorkingDirectory>$([System.IO.Path]::GetDirectoryName($(TestProject)))</TestWorkingDirectory>
<DirectorySeparatorChar>$([System.IO.Path]::DirectorySeparatorChar)</DirectorySeparatorChar>
<!-- The tests use the TEST_ARTIFACTS env variable to determine the artifacts folder and then later compare that path to its expected path.
So, the TEST_ARTIFACTS variable has to have system specific path separators or the string compoarison will fail. -->
<SystemPathTestsOutputDir>$([System.String]::Copy('$(TestsOutputDir)').Replace('/', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
<SystemPathTestsOutputDir>$([System.String]::Copy('$(SystemPathTestsOutputDir)').Replace('\', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
So, the TEST_ARTIFACTS variable has to have system specific path separators or the string compoarison will fail. -->
<SystemPathTestsOutputDir>$([System.String]::Copy('$(TestsOutputDir)').Replace('/', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
<SystemPathTestsOutputDir>$([System.String]::Copy('$(SystemPathTestsOutputDir)').Replace('\', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
</PropertyGroup>
<PropertyGroup>
<TestArgs>--no-restore $(MSBuildPassThroughPropertyList)</TestArgs>
@ -114,7 +114,7 @@
</FailedTests>
</ItemGroup>
<Message Importance="High" Condition="'@(FailedTests)' != ''" Text="Failed test summary" />
<Message Importance="High" Condition="'@(FailedTests)' != ''" Text=" %(FailedTests.Identity) failed with exit code %(FailedTests.ExitCode), see %(FailedTests.ResultsXml)" />
<Message Importance="High" Condition="'@(FailedTests)' != ''" Text=" %(FailedTests.Identity) failed with exit code %(FailedTests.ExitCode), see %(FailedTests.ResultsXml)" />
<Error Condition="'@(FailedTests)' != ''" Text="One or more test runs failed." />
</Target>