File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -103,18 +103,33 @@ jobs:
103103 Restore-PSOptions -PSOptionsPath "$psoptionsPath"
104104 Get-PSOptions | Write-Verbose -Verbose
105105
106+ if (-not (Test-Path "$repoRoot/tools/metadata.json")) {
107+ throw "metadata.json not found in $repoRoot/tools"
108+ }
109+
106110 $metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json
107- $LTS = $metadata.LTSRelease.Package
111+
112+ Write-Verbose -Verbose "metadata:"
113+ $metadata | Out-String | Write-Verbose -Verbose
114+
115+ $LTS = $metadata.LTSRelease.Package -eq 'True'
116+
117+ Write-Verbose -Verbose "LTS: $LTS"
108118
109119 if ($LTS) {
110- Write-Verbose -Message "LTS Release: $LTS"
120+ Write-Verbose -Message "LTS Release: $LTS" -Verbose
111121 }
112122
113123 Start-PSBootstrap -Package
114124
115125 $macosRuntime = "osx-$buildArch"
116126
117- Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS:$LTS
127+ Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath
128+
129+ if ($LTS) {
130+ Start-PSPackage -Type osxpkg -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath
131+ }
132+
118133 $pkgNameFilter = "powershell-*$macosRuntime.pkg"
119134 $pkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $pkgNameFilter -Recurse -File | Select-Object -ExpandProperty FullName
120135 Write-Host "##vso[artifact.upload containerfolder=macos-pkgs;artifactname=macos-pkgs]$pkgPath"
You can’t perform that action at this time.
0 commit comments