Skip to content

Commit 6a50b16

Browse files
authored
Update branding to 3.0.1 (#14404)
- includes workarounds that should be removed or improved ASAP e.g. f219a38 and fd34e14
2 parents f3b7077 + fd34e14 commit 6a50b16

10 files changed

+124
-76
lines changed

.azure/pipelines/jobs/default-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ parameters:
5555
artifacts: []
5656
buildDirectory: ''
5757
buildScript: ''
58+
installTar: true
5859
installNodeJs: true
5960
installJdk: true
6061
timeoutInMinutes: 180
@@ -146,6 +147,9 @@ jobs:
146147
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(BuildDirectory)\artifacts\tmp\selenium\"
147148
./eng/scripts/InstallGoogleChrome.ps1
148149
displayName: Install Chrome
150+
- ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}:
151+
- powershell: ./eng/scripts/InstallTar.ps1
152+
displayName: Find or install Tar
149153

150154
- ${{ parameters.beforeBuild }}
151155

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
8787

8888
<!-- Used to only produce targeting pack installers/packages once per major.minor. -->
89-
<IsTargetingPackBuilding Condition="'$(IsServicingBuild)' == 'true' AND '$(DotNetBuildFromSource)' != 'true'">false</IsTargetingPackBuilding>
89+
<IsTargetingPackBuilding Condition="'$(AspNetCorePatchVersion)' == '0' AND '$(DotNetBuildFromSource)' != 'true'">false</IsTargetingPackBuilding>
9090

9191
<!--
9292
Archives and installers using this prefix are intended for internal-use only.

Directory.Build.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858

5959
<Import Project="eng\Baseline.Designer.props" />
6060

61-
<PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(AspNetCorePatchVersion)' != '0' ">
61+
<PropertyGroup
62+
Condition=" '$(IsPackable)' != 'false' AND '$(AspNetCorePatchVersion)' != '0' AND '$(DisableServicingFeatures)' != 'true' ">
6263
<IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">$(PackagesInPatch.Contains(' $(PackageId);'))</IsPackageInThisPatch>
6364
</PropertyGroup>
6465

build.ps1

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ if (-not $foundJdk -and $RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJ
307307
# Initialize global variables need to be set before the import of Arcade is imported
308308
$restore = $RunRestore
309309

310+
# Though VS Code may indicate $nodeReuse, $warnAsError and $msbuildEngine are unused, tools.ps1 uses them.
311+
310312
# Disable node reuse - Workaround perpetual issues in node reuse and custom task assemblies
311313
$nodeReuse = $false
312314
$env:MSBUILDDISABLENODEREUSE=1
@@ -328,10 +330,10 @@ if ($CI) {
328330
}
329331

330332
# tools.ps1 corrupts global state, so reset these values in case they carried over from a previous build
331-
rm variable:global:_BuildTool -ea Ignore
332-
rm variable:global:_DotNetInstallDir -ea Ignore
333-
rm variable:global:_ToolsetBuildProj -ea Ignore
334-
rm variable:global:_MSBuildExe -ea Ignore
333+
Remove-Item variable:global:_BuildTool -ea Ignore
334+
Remove-Item variable:global:_DotNetInstallDir -ea Ignore
335+
Remove-Item variable:global:_ToolsetBuildProj -ea Ignore
336+
Remove-Item variable:global:_MSBuildExe -ea Ignore
335337

336338
# Import Arcade
337339
. "$PSScriptRoot/eng/common/tools.ps1"
@@ -391,10 +393,10 @@ finally {
391393
}
392394

393395
# tools.ps1 corrupts global state, so reset these values so they don't carry between invocations of build.ps1
394-
rm variable:global:_BuildTool -ea Ignore
395-
rm variable:global:_DotNetInstallDir -ea Ignore
396-
rm variable:global:_ToolsetBuildProj -ea Ignore
397-
rm variable:global:_MSBuildExe -ea Ignore
396+
Remove-Item variable:global:_BuildTool -ea Ignore
397+
Remove-Item variable:global:_DotNetInstallDir -ea Ignore
398+
Remove-Item variable:global:_ToolsetBuildProj -ea Ignore
399+
Remove-Item variable:global:_MSBuildExe -ea Ignore
398400

399401
if ($DumpProcesses -or $ci) {
400402
Stop-Job -Name DumpProcesses

eng/PatchConfig.props

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This file contains a list of the package IDs which are patching in a given relea
44
55
CAUTION: due to limitations in MSBuild, the format of the PackagesInPatch property is picky.
66
When adding a new package, make sure the new line ends with a semicolon and starts with a space.
7-
Later on, this will be checked using this condition:
87
8+
Directory.Build.props checks this property using the following condition:
99
<IsPackageInThisPatch>$(PackagesInPatch.Contains(' $(PackageId);'))</IsPackageInThisPatch>
1010
-->
1111
<Project>
@@ -17,57 +17,4 @@ Later on, this will be checked using this condition:
1717
<PackagesInPatch>
1818
</PackagesInPatch>
1919
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.2' ">
21-
<PackagesInPatch>
22-
@aspnet/signalr;
23-
Microsoft.AspNetCore.AspNetCoreModuleV2;
24-
Microsoft.AspNetCore.Authentication.Google;
25-
Microsoft.AspNetCore.Http;
26-
Microsoft.AspNetCore.Mvc.Core;
27-
Microsoft.AspNetCore.Routing;
28-
Microsoft.AspNetCore.Server.IIS;
29-
java:signalr;
30-
</PackagesInPatch>
31-
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.4' ">
33-
<PackagesInPatch>
34-
@aspnet/signalr;
35-
Microsoft.AspNetCore.AspNetCoreModuleV2;
36-
</PackagesInPatch>
37-
</PropertyGroup>
38-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.5' ">
39-
<PackagesInPatch>
40-
Microsoft.AspNetCore.AspNetCoreModule;
41-
Microsoft.AspNetCore.AspNetCoreModuleV2;
42-
Microsoft.AspNetCore.Identity.UI;
43-
java:signalr;
44-
Microsoft.AspNetCore.SignalR.Protocols.MessagePack;
45-
Microsoft.AspNetCore.SignalR.Redis;
46-
Microsoft.AspNetCore.SignalR.StackExchangeRedis;
47-
Microsoft.AspNetCore.DataProtection.StackExchangeRedis;
48-
Microsoft.AspNetCore.Mvc.Core;
49-
Microsoft.AspNetCore.Mvc.RazorPages;
50-
Microsoft.AspNetCore.AzureAppServicesIntegration;
51-
Microsoft.AspNetCore.AzureAppServices.HostingStartup;
52-
Microsoft.AspNetCore.AzureAppServices.SiteExtension;
53-
</PackagesInPatch>
54-
</PropertyGroup>
55-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.6' ">
56-
<PackagesInPatch>
57-
Microsoft.AspNetCore.Mvc.Api.Analyzers;
58-
Microsoft.AspNetCore.Server.HttpSys;
59-
Microsoft.AspNetCore.Server.IIS;
60-
</PackagesInPatch>
61-
</PropertyGroup>
62-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.7' ">
63-
<PackagesInPatch>
64-
Microsoft.AspNetCore.DataProtection.AzureStorage;
65-
Microsoft.AspNetCore.Hosting;
66-
Microsoft.AspNetCore.SpaServices;
67-
</PackagesInPatch>
68-
</PropertyGroup>
69-
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.8' ">
70-
<PackagesInPatch>
71-
</PackagesInPatch>
72-
</PropertyGroup>
7320
</Project>

eng/Versions.props

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,33 @@
88
<PropertyGroup Label="Version settings">
99
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
1010
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
11-
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
12-
<PreReleasePreviewNumber>2</PreReleasePreviewNumber>
11+
<AspNetCorePatchVersion>1</AspNetCorePatchVersion>
1312

1413
<!--
1514
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
1615
-->
17-
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
16+
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1817
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
1918

2019
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
2120
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
22-
<PreReleaseVersionLabel>rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
23-
<PreReleaseBrandingLabel>Release Candidate $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
21+
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
22+
<PreReleaseBrandingLabel>Servicing</PreReleaseBrandingLabel>
2423
<!-- Blazor Client packages will not RTM with 3.0 -->
2524
<BlazorClientPreReleasePreviewNumber>9</BlazorClientPreReleasePreviewNumber>
2625
<BlazorClientPreReleaseVersionLabel>preview$(BlazorClientPreReleasePreviewNumber)</BlazorClientPreReleaseVersionLabel>
2726
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
2827
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
2928
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
29+
<!--
30+
Until package baselines are updated (see aspnet/AspNetCore#12702), ignore them and PatchConfig.props. This also
31+
gives us time to build the entire repo and settle the infrastructure. Do _not_ do this when stabilizing versions.
32+
-->
33+
<DisableServicingFeatures
34+
Condition=" '$(DisableServicingFeatures)' == '' AND '$(StabilizePackageVersion)' != 'true' ">true</DisableServicingFeatures>
3035
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
31-
<IsServicingBuild Condition=" '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild>
36+
<IsServicingBuild
37+
Condition=" '$(DisableServicingFeatures)' != 'true' AND '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild>
3238
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
3339
<!-- TargetingPackVersionPrefix is used by projects, like .deb and .rpm, which use slightly different version formats. -->
3440
<TargetingPackVersionPrefix>$(VersionPrefix)</TargetingPackVersionPrefix>

eng/scripts/InstallTar.ps1

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<#
2+
.SYNOPSIS
3+
Finds or installs the Tar command on this system.
4+
.DESCRIPTION
5+
This script searches for Tar on this system. If not found, downloads and extracts Git to use its tar.exe. Prefers
6+
global installation locations even if Git has been downloaded into this repo.
7+
.PARAMETER GitVersion
8+
The version of the Git to install. If not set, the default value is read from global.json.
9+
.PARAMETER Force
10+
Overwrite the existing installation if one exists in this repo and Tar isn't installed globally.
11+
#>
12+
param(
13+
[string]$GitVersion,
14+
[switch]$Force
15+
)
16+
17+
$ErrorActionPreference = 'Stop'
18+
$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
19+
20+
Set-StrictMode -Version 1
21+
22+
# Find tar. If not found, install Git to get it.
23+
$repoRoot = (Join-Path $PSScriptRoot "..\.." -Resolve)
24+
$installDir = "$repoRoot\.tools\Git\win-x64"
25+
$tarCommand = "$installDir\usr\bin\tar.exe"
26+
$finalCommand = "$repoRoot\.tools\tar.exe"
27+
28+
Write-Host "Windows version and other information..."
29+
cmd.exe /c ver
30+
systeminfo.exe
31+
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
32+
33+
Write-Host "Checking $env:SystemRoot\System32\tar.exe"
34+
Get-ChildItem "$env:SystemRoot\System32\ta*.exe"
35+
if (Test-Path "$env:SystemRoot\System32\tar.exe") {
36+
Write-Host "Found $env:SystemRoot\System32\tar.exe"
37+
$tarCommand = "$env:SystemRoot\System32\tar.exe"
38+
}
39+
elseif (Test-Path "$env:ProgramFiles\Git\usr\bin\tar.exe") {
40+
$tarCommand = "$env:ProgramFiles\Git\usr\bin\tar.exe"
41+
}
42+
elseif (Test-Path "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe") {
43+
$tarCommand = "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe"
44+
}
45+
elseif (Test-Path "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe") {
46+
$tarCommand = "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe"
47+
}
48+
elseif ((Test-Path $tarCommand) -And (-Not $Force)) {
49+
Write-Verbose "Repo-local Git installation and $tarCommand already exist, skipping Git install."
50+
}
51+
else {
52+
if (-not $GitVersion) {
53+
$globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
54+
$GitVersion = $globalJson.tools.Git
55+
}
56+
57+
$Uri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/git/Git-${GitVersion}-64-bit.zip"
58+
59+
Import-Module -Name (Join-Path $PSScriptRoot "..\common\native\CommonLibrary.psm1" -Resolve)
60+
$InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri -InstallDirectory "$installDir\" -Force:$Force -Verbose
61+
62+
if ($InstallStatus -Eq $False) {
63+
Write-Error "Installation failed"
64+
exit 1
65+
}
66+
}
67+
68+
New-Item "$repoRoot\.tools\" -ErrorAction SilentlyContinue -ItemType Directory
69+
Copy-Item "$tarCommand" "$finalCommand" -Verbose
70+
Write-Host "Tar now available at '$finalCommand'"
71+
72+
if ($tarCommand -like '*\Git\*') {
73+
$null >.\.tools\tar.fromGit
74+
}

eng/targets/ResolveReferences.targets

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
-->
3737
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseLatestPackageReferences>
3838
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseLatestPackageReferences>
39-
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' == 'true' AND ( '$(IsServicingBuild)' != 'true' OR '$(IsPackable)' == 'true' ) ">true</UseLatestPackageReferences>
39+
<UseLatestPackageReferences
40+
Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(IsPackable)' == 'true' ">true</UseLatestPackageReferences>
4041
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' ">false</UseLatestPackageReferences>
4142

4243
<!--
@@ -45,7 +46,7 @@
4546
* when a project is a test or sample project
4647
We don't use project references between components in servicing builds between compontents to preserve the baseline as much as possible.
4748
-->
48-
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences>
49+
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences>
4950
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseProjectReferences>
5051
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' ">false</UseProjectReferences>
5152

@@ -122,7 +123,7 @@
122123
Text="Cannot reference &quot;%(_InvalidReferenceToNonSharedFxAssembly.Identity)&quot;. This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
123124
</Target>
124125

125-
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences">
126+
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences;ProcessFrameworkReferences">
126127
<Warning Condition="@(FrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->Count()) &gt; 1"
127128
Text="Redundant &lt;FrameworkReference&gt;. If you have an explicit item in the project file, you might be able to remove it. Some SDKs, like Microsoft.NET.Sdk.Web, add this implicitly." />
128129
</Target>

global.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"$(MicrosoftNETCoreAppRuntimeVersion)"
1313
]
1414
},
15+
"Git": "2.22.0",
1516
"jdk": "11.0.3",
1617
"vs": {
1718
"version": "16.0",

src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,26 @@ This package is an internal implementation of the .NET Core SDK and is not meant
169169
Inputs="@(RefPackContent)"
170170
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
171171
Condition="'$(IsPackable)' == 'true'">
172+
<PropertyGroup>
173+
<_TarCommand>tar</_TarCommand>
174+
<_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_TarCommand>
175+
176+
<!-- For the tar packed with git, transform e.g. "C:\root\AspNetCore\File.tar.gz" to "/C/root/AspNetCore/File.tar.gz". -->
177+
<_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
178+
<_TarArchiveOutputPath
179+
Condition="Exists('$(repoRoot)\.tools\tar.fromGit')">/$(TarArchiveOutputPath.Replace('\','/').Replace(':',''))</_TarArchiveOutputPath>
180+
</PropertyGroup>
181+
172182
<ZipDirectory
173183
SourceDirectory="$(TargetingPackLayoutRoot)"
174184
DestinationFile="$(ZipArchiveOutputPath)"
175185
Overwrite="true" />
186+
176187
<!-- Requires Windows 10 version 1803 or newer -->
177-
<Exec
178-
Command="tar -czf $(TarArchiveOutputPath) ."
179-
WorkingDirectory="$(TargetingPackLayoutRoot)" />
188+
<Message Importance="High" Text="Executing: $(_TarCommand) -czf $(_TarArchiveOutputPath) ." />
189+
<Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
190+
WorkingDirectory="$(TargetingPackLayoutRoot)" />
191+
180192
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
181193
</Target>
182194

0 commit comments

Comments
 (0)