diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 35074f39e5b4eb8c837716727bb5b6ead1d9640e..9aac31c5b31b48b33cf77d1ca9587a9bf0950061 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -53,7 +53,6 @@ parameters: # jobDisplayName: '' - use agentOs by default. artifacts: [] buildDirectory: $(System.DefaultWorkingDirectory)/eng/ - installTar: true installNodeJs: true installJdk: true timeoutInMinutes: 180 @@ -179,9 +178,6 @@ jobs: Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\" ./eng/scripts/InstallGoogleChrome.ps1 displayName: Install Chrome - - ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}: - - powershell: ./eng/scripts/InstallTar.ps1 - displayName: Find or install Tar - ${{ if eq(parameters.agentOs, 'Windows') }}: - powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools" displayName: Add dotnet tools to path diff --git a/eng/scripts/InstallTar.ps1 b/eng/scripts/InstallTar.ps1 deleted file mode 100644 index 12159a8d0be06b872db9de21cb7a8f178264f32e..0000000000000000000000000000000000000000 --- a/eng/scripts/InstallTar.ps1 +++ /dev/null @@ -1,74 +0,0 @@ -<# -.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 -} diff --git a/src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj b/src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj index 07d568ff72e37cc21a0b71d8d29aec331536b533..4a9dd771989ed37089c431ef67c9b3a590897306 100644 --- a/src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj +++ b/src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj @@ -85,9 +85,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant <LayoutTargetDir>$(TargetingPackLayoutRoot)$(TargetingPackSubPath)</LayoutTargetDir> <LocalInstallationOutputPath>$(LocalDotNetRoot)$(TargetingPackSubPath)</LocalInstallationOutputPath> - <ArchiveOutputFileName>aspnetcore-targeting-pack-$(PackageVersion)</ArchiveOutputFileName> - <ZipArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName).zip</ZipArchiveOutputPath> - <TarArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName).tar.gz</TarArchiveOutputPath> + <ArchiveOutputFileName>aspnetcore-targeting-pack-$(PackageVersion)-$(TargetRuntimeIdentifier)</ArchiveOutputFileName> + <ArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName)$(ArchiveExtension)</ArchiveOutputPath> </PropertyGroup> <PropertyGroup> @@ -221,29 +220,17 @@ This package is an internal implementation of the .NET Core SDK and is not meant <Target Name="_CreateTargetingPackArchive" Inputs="@(RefPackContent)" - Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)" - Condition=" '$(IsPackable)' == 'true' "> - <PropertyGroup> - <_TarCommand>tar</_TarCommand> - <_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">"$(RepoRoot).tools\tar.exe"</_TarCommand> - - <!-- For the tar packed with git, transform e.g. "C:\root\AspNetCore\File.tar.gz" to "/C/root/AspNetCore/File.tar.gz". --> - <_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath> - <_TarArchiveOutputPath - Condition="Exists('$(repoRoot)\.tools\tar.fromGit')">/$(TarArchiveOutputPath.Replace('\','/').Replace(':',''))</_TarArchiveOutputPath> - </PropertyGroup> - + Outputs="$(ArchiveOutputPath)"> <ZipDirectory SourceDirectory="$(TargetingPackLayoutRoot)" - DestinationFile="$(ZipArchiveOutputPath)" - Overwrite="true" /> - - <!-- Requires Windows 10 version 1803 or newer --> - <Message Importance="High" Text="Executing: $(_TarCommand) -czf "$(_TarArchiveOutputPath)" ." /> - <Exec Command="$(_TarCommand) -czf "$(_TarArchiveOutputPath)" ." - WorkingDirectory="$(TargetingPackLayoutRoot)" /> - - <Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" /> + DestinationFile="$(ArchiveOutputPath)" + Overwrite="true" + Condition="'$(ArchiveExtension)' == '.zip'" /> + <Exec + Command="tar -czf $(ArchiveOutputPath) ." + WorkingDirectory="$(TargetingPackLayoutRoot)" + Condition="'$(ArchiveExtension)' == '.tar.gz'" /> + <Message Importance="High" Text="$(MSBuildProjectName) -> $(ArchiveOutputPath)" /> </Target> <Target Name="IncludeFrameworkListFile" diff --git a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj index 6966845de3a6a20b38a031dcc2e55a613bdac742..345878cac07429b090ee6e1308af9fbc230df510 100644 --- a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj +++ b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj @@ -37,7 +37,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" /> <PropertyGroup> - <TargetFileName>$(TargetingPackInstallerBaseName)-$(TargetingPackVersion).deb</TargetFileName> + <TargetFileName>$(TargetingPackInstallerBaseName)-$(TargetingPackVersion)-$(TargetArchitecture).deb</TargetFileName> <TargetPath>$(TargetDir)$(TargetFileName)</TargetPath> <DebPackageVersion>$(TargetingPackVersionPrefix)</DebPackageVersion> diff --git a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj index 27894df718086d00b2ebb1cefec239e06a24b1f8..dc20b17662f0a04f6bf6e3efd6a8b2a8a215425a 100644 --- a/src/Installers/Windows/TargetingPack/TargetingPack.wixproj +++ b/src/Installers/Windows/TargetingPack/TargetingPack.wixproj @@ -66,7 +66,7 @@ <TargetingPackHarvestRoot Condition="'$(TargetingPackHarvestRoot)' == ''">$(InstallersOutputPath)</TargetingPackHarvestRoot> <TargetingPackZipVersion>$(TargetingPackVersionPrefix)</TargetingPackZipVersion> <TargetingPackZipVersion Condition="'$(VersionSuffix)' != ''">$(TargetingPackZipVersion)-$(VersionSuffix)</TargetingPackZipVersion> - <IntermediateTargetingPackZip>$(TargetingPackHarvestRoot)aspnetcore-targeting-pack-$(TargetingPackZipVersion).zip</IntermediateTargetingPackZip> + <IntermediateTargetingPackZip>$(TargetingPackHarvestRoot)aspnetcore-targeting-pack-$(TargetingPackZipVersion)-$(TargetRuntimeIdentifier).zip</IntermediateTargetingPackZip> </PropertyGroup> <Unzip SourceFiles="$(IntermediateTargetingPackZip)" DestinationFolder="$(HarvestSource)" />