[release/v7.5.6] Create LTS pkg and non-LTS pkg for macOS for LTS releases#27162
Merged
adityapatwardhan merged 1 commit intoApr 3, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Backports pipeline template changes to enable producing both non-LTS and LTS macOS installer packages from a single LTS release run, using tools/metadata.json to decide when to build the additional LTS package.
Changes:
- Add a preflight check to fail early if
tools/metadata.jsonis missing before reading it. - Always build the non-LTS
.pkg, and additionally build an LTS.pkgwhen$metadata.LTSRelease.Packageis true (and not a rebuild branch). - Ensure the LTS logging line is emitted with
-Verbose.
Comment on lines
+105
to
109
| if (-not (Test-Path "$repoRoot/tools/metadata.json")) { | ||
| throw "metadata.json not found in $repoRoot/tools" | ||
| } | ||
|
|
||
| $metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json |
There was a problem hiding this comment.
The thrown message is a bit ambiguous: it says metadata.json not found in "$repoRoot/tools" but the check is for the specific file path "$repoRoot/tools/metadata.json". Consider including the full path you tested (and/or the resolved $repoRoot value) to make failures easier to diagnose on build agents.
Suggested change
| if (-not (Test-Path "$repoRoot/tools/metadata.json")) { | |
| throw "metadata.json not found in $repoRoot/tools" | |
| } | |
| $metadata = Get-Content "$repoRoot/tools/metadata.json" -Raw | ConvertFrom-Json | |
| $metadataPath = "$repoRoot/tools/metadata.json" | |
| if (-not (Test-Path $metadataPath)) { | |
| throw "metadata.json not found at path: $metadataPath" | |
| } | |
| $metadata = Get-Content $metadataPath -Raw | ConvertFrom-Json |
daxian-dbw
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #27039 to release/v7.5.6
Triggered by @adityapatwardhan on behalf of @daxian-dbw
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Required tooling change for release/v7.5.6. Enables both LTS and non-LTS packages to be created for macOS in LTS releases. Previously, the pipeline could only create one type. This change separates package creation logic, allowing both package types to be built from a single pipeline run.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Original PR was verified by CI pipeline validation. Backport testing includes:
CI will validate the pipeline changes on the release branch.
Risk
REQUIRED: Check exactly one box.
Medium risk due to changes in macOS build pipeline. However, changes are well-scoped to the mac-package-build.yml template and primarily affect only macOS packaging for LTS releases. The added metadata.json validation improves robustness. No changes affect Windows, Linux, or other platforms. The separation of LTS and non-LTS package builds is a logical improvement that reduces complexity.