Skip to content

Commit fd34e14

Browse files
committed
Create missing directory and simplify workaround slightly
1 parent f219a38 commit fd34e14

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
@@ -170,8 +170,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
170170
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
171171
Condition="'$(IsPackable)' == 'true'">
172172
<PropertyGroup>
173+
<_TarCommand>tar</_TarCommand>
173174
<_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_TarCommand>
174-
<_TarCommand Condition="'$(_TarCommand)' == ''">tar</_TarCommand>
175175

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

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

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

0 commit comments

Comments
 (0)