Merge branch 'release/2.2'

This commit is contained in:
Nate McMaster 2018-09-05 17:25:17 -07:00
commit 63b7efc380
No known key found for this signature in database
GPG Key ID: A778D9601BD78810
8 changed files with 44 additions and 46 deletions

View File

@ -18,11 +18,26 @@ phases:
variables:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning.
TeamName: AspNetCore
# SignType = { test, real }
# This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties),
# and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop.
_SignType: real
steps:
- task: NodeTool@0
displayName: Install Node 10.x
inputs:
versionSpec: 10.x
- task: MicroBuildSigningPlugin@1
displayName: Install MicroBuild plugin
condition: and(succeeded(), in(variables['_SignType'], 'test', 'real'))
inputs:
signType: $(_SignType)
zipSources: false
# TODO: configure build.cmd to build both x64 and x86 in one invocation
# TODO build.cmd -ci
- script: build.cmd /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive
@ -34,6 +49,7 @@ phases:
-GitCredential '$(dn-bot-devdiv-build-rw-code-rw)'
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
-SignType $(_SignType)
displayName: Build ANCM installers
# TODO: configure harvesting to run as a part of build.cmd
- powershell: >
@ -42,6 +58,7 @@ phases:
-x86 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x86.zip
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
-SignType $(_SignType)
displayName: Build Windows installers
- task: PublishTestResults@2
displayName: Publish test results
@ -56,6 +73,9 @@ phases:
pathtoPublish: ./artifacts/
artifactName: artifacts-Windows-Release
artifactType: Container
- task: MicroBuildCleanup@1
displayName: Cleanup MicroBuild tasks
condition: always()
- phase: macOS
dependsOn: Windows

View File

@ -150,7 +150,7 @@
<ExternalDependency Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" />
<ExternalDependency Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtPackageVersion)" />
<ExternalDependency Include="System.Interactive.Async" Version="$(SystemInteractiveAsyncPackageVersion)" />
<ExternalDependency Include="System.IO.Pipelines" Version="$(SystemIOPipelinesPackageVersion)" />
<ExternalDependency Include="System.IO.Pipelines" Version="$(SystemIOPipelinesPackageVersion)" AppMetapackage="true" AllMetapackage="true" MetapackageVersionRangeType="Minimum" />
<ExternalDependency Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
<ExternalDependency Include="System.Net.Http.WinHttpHandler" Version="$(SystemNetHttpWinHttpHandlerPackageVersion)" />
<ExternalDependency Include="System.Net.Http" Version="$(SystemNetHttpPackageVersion)" />

View File

@ -89,7 +89,10 @@ namespace RepoTasks
continue;
}
var packageVersionValue = GetDependencyVersion(dependencyVersionType, packageName, packageVersion);
var packageVersionValue =
Enum.TryParse<VersionRangeType>(package.GetMetadata("MetapackageVersionRangeType"), out var packageVersionType)
? GetDependencyVersion(packageVersionType, packageName, packageVersion)
: GetDependencyVersion(dependencyVersionType, packageName, packageVersion);
Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}");

View File

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableApiCheck>false</EnableApiCheck>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="$(RuntimeFrameworkVersion)" />
</ItemGroup>
</Project>

View File

@ -1,29 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- MicroBuild plugins can be installed in any parent directory up the tree from the project that is building.
The use of a sentinel file (which will be installed automatically due to package dependencies from any plugin)
will help us locate the plugin packages directory while being constrained to using MSBuild's intrinsic functions,
since we want the imports to occur at evaluation time instead of when a specific target is executing.
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Allow for the ability to override the plugin directory, for example in automated builds -->
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == ''">$(MicroBuildOverridePluginDirectory)</MicroBuildPluginDirectory>
Note: All MicroBuild plugins must be installed to the same directory (under the same packages folder). If plugins
are installed to different directories, the plugins which are in the directories closest to the executing project
up the hierarchy will be discovered, and the ones higher up the tree will be ignored.
-->
<MicroBuildSentinelFile>packages\MicroBuild.Core.Sentinel.1.0.0\sentinel.txt</MicroBuildSentinelFile>
<MicroBuildSentinelFileV3>MicroBuild.Core.Sentinel\1.0.0\sentinel.txt</MicroBuildSentinelFileV3>
<MicroBuildPluginDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), $(MicroBuildSentinelFile)))</MicroBuildPluginDirectory>
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' != ''">$(MicroBuildPluginDirectory)\packages</MicroBuildPluginDirectory>
<!-- Some people might want to put the plugin packages directly in their Nuget v3 global cache. This doesn't happen by default,
but we will allow for it here. We don't support nuget.config's globalPackagesFolder setting here because we don't have a good
way to load/parse that file with MSBuild intrinsics. We can check the other two mechanisms though, which are the %NUGET_PACKAGES%
environment variable and %USERPROFILE%\.nuget\packages -->
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == '' and '$(NUGET_PACKAGES)' != '' and Exists('$(NUGET_PACKAGES)\$(MicroBuildSentinelFileV3)')">$(NUGET_PACKAGES)</MicroBuildPluginDirectory>
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == '' and '$(USERPROFILE)' != '' and Exists('$(USERPROFILE)\.nuget\packages\$(MicroBuildSentinelFileV3)')">$(USERPROFILE)\.nuget\packages</MicroBuildPluginDirectory>
<!-- Allow for the ability to override the plugin directory, for example in automated builds -->
<MicroBuildPluginDirectory Condition="'$(MicroBuildOverridePluginDirectory)' != ''">$(MicroBuildOverridePluginDirectory)</MicroBuildPluginDirectory>
</PropertyGroup>
</Project>
<!-- Some people might want to put the plugin packages directly in their Nuget v3 global cache. This doesn't happen by default, but we will allow for it here. -->
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == '' and '$(NuGetPackageRoot)' != '' ">$(NuGetPackageRoot)</MicroBuildPluginDirectory>
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == '' and '$(NUGET_PACKAGES)' != '' ">$(NUGET_PACKAGES)</MicroBuildPluginDirectory>
<MicroBuildPluginDirectory Condition="'$(MicroBuildPluginDirectory)' == '' and '$(USERPROFILE)' != '' ">$(USERPROFILE)\.nuget\packages</MicroBuildPluginDirectory>
</PropertyGroup>
</Project>

View File

@ -22,6 +22,7 @@
</ItemGroup>
<PropertyGroup>
<SignOutput Condition=" '$(SignType)' != '' ">true</SignOutput>
<DarkToolPath>$(WixExtDir)dark.exe</DarkToolPath>
</PropertyGroup>

View File

@ -13,6 +13,7 @@ param(
[Alias("x64")]
[string]$Runtime64Zip,
[string]$BuildNumber = 't000',
[string]$SignType = '',
[string]$AccessTokenSuffix = $null,
[string]$AssetRootUrl = $null,
@ -80,7 +81,8 @@ try {
"-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" `
"-p:Configuration=$Configuration" `
"-p:BuildNumber=$BuildNumber" `
-bl `
"-p:SignType=$SignType" `
"-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog" `
@msbuildArgs
}
}

View File

@ -9,7 +9,8 @@ param(
[string]$Configuration = 'Release',
[string]$DepsZip,
[string]$BuildNumber = 't000',
[string]$AncmSourceBranch = 'master'
[string]$AncmSourceBranch = 'master',
[string]$SignType = ''
)
$ErrorActionPreference = 'Stop'
@ -102,7 +103,9 @@ try {
"-p:WixTasksPath=$wixToolSetRoot\wixtasks.dll" `
"-p:WixNativeCATargetsPath=$wixToolSetRoot\sdk\wix.nativeca.targets" `
"-p:Configuration=$Configuration" `
"-p:BuildNumber=$BuildNumber"
"-p:BuildNumber=$BuildNumber" `
"-p:SignType=$SignType" `
"-bl:$repoRoot/artifacts/logs/ancn.msbuild.binlog"
}
$outputPath = "$repoRoot/artifacts/bin/$Configuration/installers/en-US/"