Skip to content

Commit 8710670

Browse files
authored
Always produce a .zip and .tar.gz for the targeting pack (#11230)
1 parent 9466ec7 commit 8710670

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

docs/BuildFromSource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See https://github.com/aspnet/AspNetCore/labels/area-infrastructure for known is
1111

1212
Building ASP.NET Core on Windows requires:
1313

14-
* Windows 10
14+
* Windows 10, version 1803 or newer
1515
* At least 10 GB of disk space and a good internet connection (our build scripts download a lot of tools and dependencies)
1616
* Visual Studio 2019. <https://visualstudio.com>
1717
* To install the exact required components, run [eng/scripts/InstallVisualStudio.ps1](/eng/scripts/InstallVisualStudio.ps1).

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
5656
<LayoutTargetDir>$(TargetingPackLayoutRoot)$(TargetingPackSubPath)</LayoutTargetDir>
5757
<LocalInstallationOutputPath>$(LocalDotNetRoot)$(TargetingPackSubPath)</LocalInstallationOutputPath>
5858

59-
<ArchiveOutputFileName Condition="'$(TargetRuntimeIdentifier)' == 'win-x64'">aspnetcore-targeting-pack-$(PackageVersion).zip</ArchiveOutputFileName>
60-
<ArchiveOutputFileName Condition="'$(TargetRuntimeIdentifier)' == 'linux-x64'">aspnetcore-targeting-pack-$(PackageVersion).tar.gz</ArchiveOutputFileName>
61-
<ArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName)</ArchiveOutputPath>
59+
<ArchiveOutputFileName>aspnetcore-targeting-pack-$(PackageVersion)</ArchiveOutputFileName>
60+
<ZipArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName).zip</ZipArchiveOutputPath>
61+
<TarArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName).tar.gz</TarArchiveOutputPath>
6262
</PropertyGroup>
6363

6464
<PropertyGroup>
@@ -161,18 +161,17 @@ This package is an internal implementation of the .NET Core SDK and is not meant
161161

162162
<Target Name="_CreateTargetingPackArchive"
163163
Inputs="@(RefPackContent)"
164-
Outputs="$(ArchiveOutputPath)"
164+
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
165165
Condition="'$(IsPackable)' == 'true'">
166166
<ZipDirectory
167167
SourceDirectory="$(TargetingPackLayoutRoot)"
168-
DestinationFile="$(ArchiveOutputPath)"
169-
Overwrite="true"
170-
Condition="'$(TargetRuntimeIdentifier)' == 'win-x64'" />
168+
DestinationFile="$(ZipArchiveOutputPath)"
169+
Overwrite="true" />
170+
<!-- Requires Windows 10 version 1803 or newer -->
171171
<Exec
172-
Command="tar -czf $(ArchiveOutputPath) ."
173-
WorkingDirectory="$(TargetingPackLayoutRoot)"
174-
Condition="'$(TargetRuntimeIdentifier)' == 'linux-x64'" />
175-
<Message Importance="High" Text="$(MSBuildProjectName) -> $(ArchiveOutputPath)" />
172+
Command="tar -czf $(TarArchiveOutputPath) ."
173+
WorkingDirectory="$(TargetingPackLayoutRoot)" />
174+
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
176175
</Target>
177176

178177
</Project>

0 commit comments

Comments
 (0)