@@ -42,15 +42,18 @@ param (
4242 [ValidatePattern (" -signed.zip$" )]
4343 [string ]$BuildZip ,
4444
45- [string ]$ArtifactName = ' result'
45+
46+ [string ]$ArtifactName = ' result' ,
47+
48+ [switch ]$SkipReleaseChecks
4649)
4750
4851$repoRoot = $location
4952
50- if ($Build.IsPresent -or $PSCmdlet.ParameterSetName -eq ' packageSigned' ) {
51- $releaseTagParam = @ { }
53+ if ($Build -or $PSCmdlet.ParameterSetName -eq ' packageSigned' ) {
54+ $releaseTagParam = @ {}
5255 if ($ReleaseTag ) {
53- $releaseTagParam = @ { ' ReleaseTag' = $ReleaseTag }
56+ $releaseTagParam [ ' ReleaseTag' ] = $ReleaseTag
5457
5558 # Remove the initial 'v' from the ReleaseTag
5659 $version = $ReleaseTag -replace ' ^v'
@@ -65,13 +68,14 @@ if ($Build.IsPresent -or $PSCmdlet.ParameterSetName -eq 'packageSigned') {
6568
6669Push-Location
6770try {
71+ $pspackageParams = @ { SkipReleaseChecks = $SkipReleaseChecks ; MacOSRuntime = $Runtime }
6872 Write-Verbose - Message " Init..." - Verbose
6973 Set-Location $repoRoot
7074 Import-Module " $repoRoot /build.psm1"
7175 Import-Module " $repoRoot /tools/packaging"
7276 Sync-PSTags - AddRemoteIfMissing
7377
74- if ($BootStrap.IsPresent ) {
78+ if ($BootStrap ) {
7579 Start-PSBootstrap - Package
7680 }
7781
@@ -81,15 +85,15 @@ try {
8185
8286 Remove-Item - Path $BuildZip
8387
84- Start-PSPackage @releaseTagParam
88+ Start-PSPackage @pspackageParams @ releaseTagParam
8589 switch ($ExtraPackage ) {
86- " tar" { Start-PSPackage - Type tar @releaseTagParam }
90+ " tar" { Start-PSPackage - Type tar @pspackageParams @ releaseTagParam }
8791 }
8892
8993 if ($LTS ) {
90- Start-PSPackage @releaseTagParam - LTS
94+ Start-PSPackage @pspackageParams @ releaseTagParam - LTS
9195 switch ($ExtraPackage ) {
92- " tar" { Start-PSPackage - Type tar @releaseTagParam - LTS }
96+ " tar" { Start-PSPackage - Type tar @pspackageParams @ releaseTagParam - LTS }
9397 }
9498 }
9599 }
@@ -121,7 +125,7 @@ try {
121125 Pop-Location
122126}
123127
124- if ($Build.IsPresent -or $PSCmdlet.ParameterSetName -eq ' packageSigned' ) {
128+ if ($Build -or $PSCmdlet.ParameterSetName -eq ' packageSigned' ) {
125129 $macPackages = Get-ChildItem " $repoRoot /powershell*" - Include * .pkg, * .tar.gz, * .zip
126130 foreach ($macPackage in $macPackages ) {
127131 $filePath = $macPackage.FullName
0 commit comments