@@ -870,8 +870,11 @@ function New-UnixPackage {
870
870
# This is a string because strings are appended to it
871
871
[string ]$Iteration = " 1" ,
872
872
873
+ # Host architecture values allowed for deb type packages: amd64
874
+ # Host architecture values allowed for rpm type packages include: x86_64, aarch64, native, all, noarch, any
875
+ # Host architecture values allowed for osxpkg type packages include: x86_64, arm64
873
876
[string ]
874
- [ValidateSet (" x86_64" , " amd64" , " aarch64" , " native" , " all" , " noarch" , " any" )]
877
+ [ValidateSet (" x86_64" , " amd64" , " aarch64" , " arm64 " , " native" , " all" , " noarch" , " any" )]
875
878
$HostArchitecture ,
876
879
877
880
[Switch ]
@@ -908,19 +911,6 @@ function New-UnixPackage {
908
911
909
912
$Dict.Add (" Distribution" , $Parameter ) > $null
910
913
return $Dict
911
- } elseif ($Type -eq " osxpkg" ) {
912
- # Add a dynamic parameter '-HostArchitecture' when the specified package type is 'osxpkg'.
913
- # The '-HostArchitecture' parameter is used to indicate which Mac processor this package is targeting,
914
- # Intel (x86_64) or Apple Silicon (arm64).
915
- $ParameterAttr = New-Object " System.Management.Automation.ParameterAttribute"
916
- $ValidateSetAttr = New-Object " System.Management.Automation.ValidateSetAttribute" - ArgumentList " x86_64" , " arm64"
917
- $Attributes = New-Object " System.Collections.ObjectModel.Collection`` 1[System.Attribute]"
918
- $Attributes.Add ($ParameterAttr ) > $null
919
- $Attributes.Add ($ValidateSetAttr ) > $null
920
- $Parameter = New-Object " System.Management.Automation.RuntimeDefinedParameter" - ArgumentList (" HostArchitecture" , [string ], $Attributes )
921
- $Dict = New-Object " System.Management.Automation.RuntimeDefinedParameterDictionary"
922
- $Dict.Add (" HostArchitecture" , $Parameter ) > $null
923
- return $Dict
924
914
}
925
915
}
926
916
@@ -974,7 +964,6 @@ function New-UnixPackage {
974
964
throw ($ErrorMessage -f " macOS" )
975
965
}
976
966
977
- $HostArchitecture = $PSBoundParameters [' HostArchitecture' ]
978
967
$DebDistro = ' macOS'
979
968
}
980
969
}
0 commit comments