Skip to content

Commit 65c8ece

Browse files
authored
[release/v7.6] Create LTS pkg and non-LTS pkg for macOS for LTS releases (#27040)
1 parent 8f2c35e commit 65c8ece

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.pipelines/templates/mac-package-build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ jobs:
102102
Restore-PSOptions -PSOptionsPath "$psoptionsPath"
103103
Get-PSOptions | Write-Verbose -Verbose
104104
105+
if (-not (Test-Path "$repoRoot/tools/metadata.json")) {
106+
throw "metadata.json not found in $repoRoot/tools"
107+
}
108+
105109
$metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json
106110
107111
Write-Verbose -Verbose "metadata:"
@@ -120,14 +124,19 @@ jobs:
120124
Write-Verbose -Verbose "LTS: $LTS"
121125
122126
if ($LTS) {
123-
Write-Verbose -Message "LTS Release: $LTS"
127+
Write-Verbose -Message "LTS Release: $LTS" -Verbose
124128
}
125129
126130
Start-PSBootstrap -Scenario Package
127131
128132
$macosRuntime = "osx-$buildArch"
129133
130-
Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS:$LTS
134+
Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath
135+
136+
if ($LTS) {
137+
Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS
138+
}
139+
131140
$pkgNameFilter = "powershell-*$macosRuntime.pkg"
132141
Write-Verbose -Verbose "Looking for pkg packages with filter: $pkgNameFilter in '$(Pipeline.Workspace)' to upload..."
133142
$pkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $pkgNameFilter -Recurse -File

0 commit comments

Comments
 (0)