Browse Source

Create missing directory and simplify workaround slightly

Doug Bunting 6 years ago
parent
commit
219b528ac2
2 changed files with 5 additions and 15 deletions
  1. 2 4
      eng/scripts/InstallTar.ps1
  2. 3 11
      src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

+ 2 - 4
eng/scripts/InstallTar.ps1

@@ -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'"
 

+ 3 - 11
src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

@@ -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>