Create missing directory and simplify workaround slightly
This commit is contained in:
parent
477fa8ce4c
commit
219b528ac2
|
|
@ -25,13 +25,10 @@ $installDir = "$repoRoot\.tools\Git\win-x64"
|
||||||
$tarCommand = "$installDir\usr\bin\tar.exe"
|
$tarCommand = "$installDir\usr\bin\tar.exe"
|
||||||
$finalCommand = "$repoRoot\.tools\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
|
cmd.exe /c ver
|
||||||
systeminfo.exe
|
systeminfo.exe
|
||||||
|
|
||||||
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
|
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
|
||||||
Write-Host "Dumping environment"
|
|
||||||
Get-ChildItem env:\
|
|
||||||
|
|
||||||
Write-Host "Checking $env:SystemRoot\System32\tar.exe"
|
Write-Host "Checking $env:SystemRoot\System32\tar.exe"
|
||||||
Get-ChildItem "$env:SystemRoot\System32\ta*.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
|
Copy-Item "$tarCommand" "$finalCommand" -Verbose
|
||||||
Write-Host "Tar now available at '$finalCommand'"
|
Write-Host "Tar now available at '$finalCommand'"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
|
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
|
||||||
Condition="'$(IsPackable)' == 'true'">
|
Condition="'$(IsPackable)' == 'true'">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<_TarCommand>tar</_TarCommand>
|
||||||
<_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_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". -->
|
<!-- 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>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
|
||||||
|
|
@ -187,17 +187,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
|
|
||||||
<!-- Requires Windows 10 version 1803 or newer -->
|
<!-- Requires Windows 10 version 1803 or newer -->
|
||||||
<Message Importance="High" Text="Processor Architecture: $(PROCESSOR_ARCHITECTURE)"
|
<Message Importance="High" Text="Executing: $(_TarCommand) -czf $(_TarArchiveOutputPath) ." />
|
||||||
Condition="'$(OS)' == 'Windows_NT'" />
|
|
||||||
<Message Importance="High" Text="Tar Command: $(_TarCommand) -czf $(_TarArchiveOutputPath) ."
|
|
||||||
Condition="'$(OS)' == 'Windows_NT'" />
|
|
||||||
<Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
|
<Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
|
||||||
WorkingDirectory="$(TargetingPackLayoutRoot)"
|
WorkingDirectory="$(TargetingPackLayoutRoot)" />
|
||||||
Condition="'$(OS)' == 'Windows_NT'" />
|
|
||||||
|
|
||||||
<Exec Command="tar -czf $(_TarArchiveOutputPath) ."
|
|
||||||
WorkingDirectory="$(TargetingPackLayoutRoot)"
|
|
||||||
Condition="'$(OS)' != 'Windows_NT'" />
|
|
||||||
|
|
||||||
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
|
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue