Do not create .zip files on Linux/Mac (#11188)

* Do not create .zip files on Linux/Mac
Avoid creating the .zip files on Linux/Mac, as they are not distributed or used in any scenario.
This saves > 20% of the total artifact size for this build (2.7 GB). Yay!

* Ensure output directories are created first
This commit is contained in:
Matt Mitchell 2021-07-21 14:05:33 -07:00 committed by GitHub
parent ebd2d1d607
commit cd2487150a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,12 +10,18 @@
<IgnoreTarExitCode Condition="'$(DOTNET_CORESDK_IGNORE_TAR_EXIT_CODE)' == '1'">true</IgnoreTarExitCode>
</PropertyGroup>
<!-- Ensure output directories are created -->
<MakeDir Directories="$(ArtifactsShippingPackagesDir);$(ArtifactsNonShippingPackagesDir)" />
<!-- Create .tar.gz files on Linux/MacOS, and .zip files on Windows -->
<ZipFileCreateFromDirectory
Condition=" '$(OSName)' == 'win' "
SourceDirectory="$(RedistLayoutPath)"
DestinationArchive="$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk).zip"
OverwriteDestination="true" />
<ZipFileCreateFromDirectory
Condition=" '$(OSName)' == 'win' "
SourceDirectory="$(SdkInternalLayoutPath)"
DestinationArchive="$(ArtifactsNonShippingPackagesDir)$(ArtifactNameWithVersionSdk).zip"
OverwriteDestination="true" />