Skip to content

Commit c31c514

Browse files
committed
Create missing directory and simplify workaround slightly
1 parent f6eab78 commit c31c514

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

eng/scripts/InstallTar.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ $installDir = "$repoRoot\.tools\Git\win-x64"
2525
$tarCommand = "$installDir\usr\bin\tar.exe"
2626
$finalCommand = "$repoRoot\.tools\tar.exe"
2727

28-
Write-Host "Windows version and other information, because who knows"
28+
Write-Host "Windows version and other information..."
2929
cmd.exe /c ver
3030
systeminfo.exe
31-
3231
Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
33-
Write-Host "Dumping environment"
34-
Get-ChildItem env:\
3532

3633
Write-Host "Checking $env:SystemRoot\System32\tar.exe"
3734
Get-ChildItem "$env:SystemRoot\System32\ta*.exe"
@@ -68,6 +65,7 @@ else {
6865
}
6966
}
7067

68+
New-Item "$repoRoot\.tools\" -ErrorAction SilentlyContinue -ItemType Directory
7169
Copy-Item "$tarCommand" "$finalCommand" -Verbose
7270
Write-Host "Tar now available at '$finalCommand'"
7371

src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
172172
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
173173
Condition="'$(IsPackable)' == 'true'">
174174
<PropertyGroup>
175+
<_TarCommand>tar</_TarCommand>
175176
<_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_TarCommand>
176-
<_TarCommand Condition="'$(_TarCommand)' == ''">tar</_TarCommand>
177177

178178
<!-- For the tar packed with git, transform e.g. "C:\root\AspNetCore\File.tar.gz" to "/C/root/AspNetCore/File.tar.gz". -->
179179
<_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
@@ -187,17 +187,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
187187
Overwrite="true" />
188188

189189
<!-- Requires Windows 10 version 1803 or newer -->
190-
<Message Importance="High" Text="Processor Architecture: $(PROCESSOR_ARCHITECTURE)"
191-
Condition="'$(OS)' == 'Windows_NT'" />
192-
<Message Importance="High" Text="Tar Command: $(_TarCommand) -czf $(_TarArchiveOutputPath) ."
193-
Condition="'$(OS)' == 'Windows_NT'" />
190+
<Message Importance="High" Text="Executing: $(_TarCommand) -czf $(_TarArchiveOutputPath) ." />
194191
<Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
195-
WorkingDirectory="$(TargetingPackLayoutRoot)"
196-
Condition="'$(OS)' == 'Windows_NT'" />
197-
198-
<Exec Command="tar -czf $(_TarArchiveOutputPath) ."
199-
WorkingDirectory="$(TargetingPackLayoutRoot)"
200-
Condition="'$(OS)' != 'Windows_NT'" />
192+
WorkingDirectory="$(TargetingPackLayoutRoot)" />
201193

202194
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
203195
</Target>

0 commit comments

Comments
 (0)