Skip to content

Commit ce6a9d1

Browse files
TravisEz13adityapatwardhan
authored andcommitted
Enable ARM64 packaging for macOS (#15768)
# Conflicts: # tools/packaging/packaging.psm1 # tools/releaseBuild/azureDevOps/templates/mac-package-build.yml # tools/releaseBuild/azureDevOps/templates/mac.yml
1 parent af60309 commit ce6a9d1

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

tools/ci.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ if(Test-Path $dotNetPath)
1616
}
1717

1818
# import build into the global scope so it can be used by packaging
19-
Import-Module (Join-Path $repoRoot 'build.psm1') -Scope Global
20-
Import-Module (Join-Path $repoRoot 'tools\packaging') -Scope Global
19+
Import-Module (Join-Path $repoRoot 'build.psm1') -Verbose -Scope Global
20+
Import-Module (Join-Path $repoRoot 'tools\packaging') -Verbose -Scope Global
2121

2222
# import the windows specific functcion only in Windows PowerShell or on Windows
2323
if($PSVersionTable.PSEdition -eq 'Desktop' -or $IsWindows)

tools/releaseBuild/macOS/PowerShellPackageVsts.ps1

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

6669
Push-Location
6770
try {
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

Comments
 (0)