Pack get stripped out of the list of properties so let's route to a different property when pack is set

This commit is contained in:
Marc Paine 2023-10-06 16:32:04 -07:00
parent d5ed66a106
commit 577b7aab27
5 changed files with 11 additions and 3 deletions

View file

@ -4,7 +4,7 @@
</PropertyGroup>
<Target Name="PopulateGenerateChecksumItems"
Condition="'$(Pack)' == 'true'"
Condition="'$(PackInstaller)' == 'true'"
AfterTargets="Build"
BeforeTargets="GenerateChecksums" >

View file

@ -8,6 +8,7 @@ param(
[string]$Configuration="Debug",
[string]$Architecture="x64",
[switch]$Sign=$false,
[switch]$Pack=$false,
[switch]$PgoInstrument,
[bool]$WarnAsError=$true,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$ExtraParameters
@ -29,6 +30,10 @@ if ($Sign) {
$WarnAsError = $false
}
if ($Pack) {
$Parameters = "$Parameters /p:PackInstaller=true"
}
$Parameters = "$Parameters -WarnAsError `$$WarnAsError"
try {

View file

@ -45,6 +45,9 @@ while [[ $# > 0 ]]; do
--pgoInstrument)
args+=("/p:PgoInstrument=true")
;;
--pack)
args+=("/p:PackInstaller=true")
;;
--help)
echo "Usage: $0 [--configuration <CONFIGURATION>] [--architecture <ARCHITECTURE>] [--docker <IMAGENAME>] [--help]"
echo ""

View file

@ -1,7 +1,7 @@
<Project>
<!-- Crossgen is currently not supported on the s390x, ppc64le architecture as using mono instead of CoreCLR. -->
<Target Name="CrossgenLayout"
Condition="'$(DISABLE_CROSSGEN)' == '' AND '$(Architecture)' != 's390x' AND '$(Architecture)' != 'ppc64le' AND '$(Pack)' == 'true'"
Condition="'$(DISABLE_CROSSGEN)' == '' AND '$(Architecture)' != 's390x' AND '$(Architecture)' != 'ppc64le' AND '$(PackInstaller)' == 'true'"
DependsOnTargets="SetSdkBrandingInfo">
<PropertyGroup>

View file

@ -1,6 +1,6 @@
<Project>
<Target Name="GenerateArchives"
Condition="'$(Pack)' == 'true'"
Condition="'$(PackInstaller)' == 'true'"
DependsOnTargets="GenerateLayout;GetCurrentRuntimeInformation"
BeforeTargets="AfterBuild">