-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Update branding to 3.0.1 #14404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update branding to 3.0.1 #14404
Changes from all commits
c974842
fcad3da
8bfb2a7
2d9d13a
3c65c03
f219a38
fd34e14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -307,6 +307,8 @@ if (-not $foundJdk -and $RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJ | |
# Initialize global variables need to be set before the import of Arcade is imported | ||
$restore = $RunRestore | ||
|
||
# Though VS Code may indicate $nodeReuse, $warnAsError and $msbuildEngine are unused, tools.ps1 uses them. | ||
|
||
# Disable node reuse - Workaround perpetual issues in node reuse and custom task assemblies | ||
$nodeReuse = $false | ||
$env:MSBUILDDISABLENODEREUSE=1 | ||
|
@@ -328,10 +330,10 @@ if ($CI) { | |
} | ||
|
||
# tools.ps1 corrupts global state, so reset these values in case they carried over from a previous build | ||
rm variable:global:_BuildTool -ea Ignore | ||
rm variable:global:_DotNetInstallDir -ea Ignore | ||
rm variable:global:_ToolsetBuildProj -ea Ignore | ||
rm variable:global:_MSBuildExe -ea Ignore | ||
Remove-Item variable:global:_BuildTool -ea Ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change? Looks fine but I'm just curious. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because aliases are bad in scripts and VS Code warns about them |
||
Remove-Item variable:global:_DotNetInstallDir -ea Ignore | ||
Remove-Item variable:global:_ToolsetBuildProj -ea Ignore | ||
Remove-Item variable:global:_MSBuildExe -ea Ignore | ||
|
||
# Import Arcade | ||
. "$PSScriptRoot/eng/common/tools.ps1" | ||
|
@@ -391,10 +393,10 @@ finally { | |
} | ||
|
||
# tools.ps1 corrupts global state, so reset these values so they don't carry between invocations of build.ps1 | ||
rm variable:global:_BuildTool -ea Ignore | ||
rm variable:global:_DotNetInstallDir -ea Ignore | ||
rm variable:global:_ToolsetBuildProj -ea Ignore | ||
rm variable:global:_MSBuildExe -ea Ignore | ||
Remove-Item variable:global:_BuildTool -ea Ignore | ||
Remove-Item variable:global:_DotNetInstallDir -ea Ignore | ||
Remove-Item variable:global:_ToolsetBuildProj -ea Ignore | ||
Remove-Item variable:global:_MSBuildExe -ea Ignore | ||
|
||
if ($DumpProcesses -or $ci) { | ||
Stop-Job -Name DumpProcesses | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<# | ||
.SYNOPSIS | ||
Finds or installs the Tar command on this system. | ||
.DESCRIPTION | ||
This script searches for Tar on this system. If not found, downloads and extracts Git to use its tar.exe. Prefers | ||
global installation locations even if Git has been downloaded into this repo. | ||
.PARAMETER GitVersion | ||
The version of the Git to install. If not set, the default value is read from global.json. | ||
.PARAMETER Force | ||
Overwrite the existing installation if one exists in this repo and Tar isn't installed globally. | ||
#> | ||
param( | ||
[string]$GitVersion, | ||
[switch]$Force | ||
) | ||
|
||
$ErrorActionPreference = 'Stop' | ||
$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 | ||
|
||
Set-StrictMode -Version 1 | ||
|
||
# Find tar. If not found, install Git to get it. | ||
$repoRoot = (Join-Path $PSScriptRoot "..\.." -Resolve) | ||
$installDir = "$repoRoot\.tools\Git\win-x64" | ||
$tarCommand = "$installDir\usr\bin\tar.exe" | ||
$finalCommand = "$repoRoot\.tools\tar.exe" | ||
|
||
Write-Host "Windows version and other information..." | ||
cmd.exe /c ver | ||
systeminfo.exe | ||
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE" | ||
|
||
Write-Host "Checking $env:SystemRoot\System32\tar.exe" | ||
Get-ChildItem "$env:SystemRoot\System32\ta*.exe" | ||
if (Test-Path "$env:SystemRoot\System32\tar.exe") { | ||
Write-Host "Found $env:SystemRoot\System32\tar.exe" | ||
$tarCommand = "$env:SystemRoot\System32\tar.exe" | ||
} | ||
elseif (Test-Path "$env:ProgramFiles\Git\usr\bin\tar.exe") { | ||
$tarCommand = "$env:ProgramFiles\Git\usr\bin\tar.exe" | ||
} | ||
elseif (Test-Path "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe") { | ||
$tarCommand = "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe" | ||
} | ||
elseif (Test-Path "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe") { | ||
$tarCommand = "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe" | ||
} | ||
elseif ((Test-Path $tarCommand) -And (-Not $Force)) { | ||
Write-Verbose "Repo-local Git installation and $tarCommand already exist, skipping Git install." | ||
} | ||
else { | ||
if (-not $GitVersion) { | ||
$globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json | ||
$GitVersion = $globalJson.tools.Git | ||
} | ||
|
||
$Uri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/git/Git-${GitVersion}-64-bit.zip" | ||
|
||
Import-Module -Name (Join-Path $PSScriptRoot "..\common\native\CommonLibrary.psm1" -Resolve) | ||
$InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri -InstallDirectory "$installDir\" -Force:$Force -Verbose | ||
|
||
if ($InstallStatus -Eq $False) { | ||
Write-Error "Installation failed" | ||
exit 1 | ||
} | ||
} | ||
|
||
New-Item "$repoRoot\.tools\" -ErrorAction SilentlyContinue -ItemType Directory | ||
Copy-Item "$tarCommand" "$finalCommand" -Verbose | ||
Write-Host "Tar now available at '$finalCommand'" | ||
|
||
if ($tarCommand -like '*\Git\*') { | ||
$null >.\.tools\tar.fromGit | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,8 @@ | |
--> | ||
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseLatestPackageReferences> | ||
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseLatestPackageReferences> | ||
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' == 'true' AND ( '$(IsServicingBuild)' != 'true' OR '$(IsPackable)' == 'true' ) ">true</UseLatestPackageReferences> | ||
<UseLatestPackageReferences | ||
Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(IsPackable)' == 'true' ">true</UseLatestPackageReferences> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remaining changes in this file just address nits. Removed of |
||
<UseLatestPackageReferences Condition=" '$(UseLatestPackageReferences)' == '' ">false</UseLatestPackageReferences> | ||
|
||
<!-- | ||
|
@@ -45,7 +46,7 @@ | |
* when a project is a test or sample project | ||
We don't use project references between components in servicing builds between compontents to preserve the baseline as much as possible. | ||
--> | ||
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences> | ||
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences> | ||
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseProjectReferences> | ||
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' ">false</UseProjectReferences> | ||
|
||
|
@@ -122,7 +123,7 @@ | |
Text="Cannot reference "%(_InvalidReferenceToNonSharedFxAssembly.Identity)". This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." /> | ||
</Target> | ||
|
||
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences"> | ||
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences;ProcessFrameworkReferences"> | ||
<Warning Condition="@(FrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->Count()) > 1" | ||
Text="Redundant <FrameworkReference>. 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." /> | ||
</Target> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm well, we need to rebuild the targeting pack in 3.0.1 so this logic needs some finessing. We need to be able to control whether the targeting pack builds. We can use this as a default logic though.