Skip to content
代码片段 群组 项目
未验证 提交 95d0fef5 编辑于 作者: William Godbe's avatar William Godbe 提交者: GitHub
浏览文件

Remove install-tar & mentions from repo (#40720)

上级 06b701df
No related branches found
No related tags found
加载中
...@@ -188,8 +188,6 @@ jobs: ...@@ -188,8 +188,6 @@ jobs:
./eng/scripts/InstallGoogleChrome.ps1 ./eng/scripts/InstallGoogleChrome.ps1
displayName: Install Chrome displayName: Install Chrome
- ${{ if eq(parameters.agentOs, 'Windows') }}: - ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: ./eng/scripts/InstallTar.ps1
displayName: Find or install Tar
- powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools" - powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
displayName: Add dotnet tools to path displayName: Add dotnet tools to path
- ${{ if ne(parameters.agentOs, 'Windows') }}: - ${{ if ne(parameters.agentOs, 'Windows') }}:
......
...@@ -109,10 +109,6 @@ NodeJS installs the Node package manager (npm) by default. This repo depends on ...@@ -109,10 +109,6 @@ NodeJS installs the Node package manager (npm) by default. This repo depends on
npm install -g yarn npm install -g yarn
``` ```
#### [tar](http://gnuwin32.sourceforge.net/packages/gtar.htm) on Windows
Building the repo requires tar to be installed. First, check whether `tar.exe` is already in your path i.e. execute `tar -help` (Win10 comes with tar already installed). Then, assuming you have `git` installed, you might add `C:\Program Files\Git\usr\bin\` to your path to pick up the `tar.exe` that ships with `git`. Finally, you can find installation executables of tar at <http://gnuwin32.sourceforge.net/packages/gtar.htm>; download that and add the installation directory to your PATH variable.
#### Java Development Kit on Windows #### Java Development Kit on Windows
This repo contains some Java source code that depends on an install of the JDK v11 or newer. The JDK can be installed from either: This repo contains some Java source code that depends on an install of the JDK v11 or newer. The JDK can be installed from either:
......
<#
.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
}
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册