Create missing directory and simplify workaround slightly

This commit is contained in:
Doug Bunting 2019-09-30 19:14:00 -07:00
parent 477fa8ce4c
commit 219b528ac2
No known key found for this signature in database
GPG Key ID: EE41520987982C03
2 changed files with 5 additions and 15 deletions

View File

@ -25,13 +25,10 @@ $installDir = "$repoRoot\.tools\Git\win-x64"
$tarCommand = "$installDir\usr\bin\tar.exe"
$finalCommand = "$repoRoot\.tools\tar.exe"
Write-Host "Windows version and other information, because who knows"
Write-Host "Windows version and other information..."
cmd.exe /c ver
systeminfo.exe
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
Write-Host "Dumping environment"
Get-ChildItem env:\
Write-Host "Checking $env:SystemRoot\System32\tar.exe"
Get-ChildItem "$env:SystemRoot\System32\ta*.exe"
@ -68,6 +65,7 @@ else {
}
}
New-Item "$repoRoot\.tools\" -ErrorAction SilentlyContinue -ItemType Directory
Copy-Item "$tarCommand" "$finalCommand" -Verbose
Write-Host "Tar now available at '$finalCommand'"

View File

@ -172,8 +172,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
Condition="'$(IsPackable)' == 'true'">
<PropertyGroup>
<_TarCommand>tar</_TarCommand>
<_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_TarCommand>
<_TarCommand Condition="'$(_TarCommand)' == ''">tar</_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>
@ -187,17 +187,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Overwrite="true" />
<!-- Requires Windows 10 version 1803 or newer -->
<Message Importance="High" Text="Processor Architecture: $(PROCESSOR_ARCHITECTURE)"
Condition="'$(OS)' == 'Windows_NT'" />
<Message Importance="High" Text="Tar Command: $(_TarCommand) -czf $(_TarArchiveOutputPath) ."
Condition="'$(OS)' == 'Windows_NT'" />
<Message Importance="High" Text="Executing: $(_TarCommand) -czf $(_TarArchiveOutputPath) ." />
<Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
WorkingDirectory="$(TargetingPackLayoutRoot)"
Condition="'$(OS)' == 'Windows_NT'" />
<Exec Command="tar -czf $(_TarArchiveOutputPath) ."
WorkingDirectory="$(TargetingPackLayoutRoot)"
Condition="'$(OS)' != 'Windows_NT'" />
WorkingDirectory="$(TargetingPackLayoutRoot)" />
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
</Target>