Skip to content

[release/v7.4.15] Create infrastructure to create two msixs and msixbundles for LTS and Stable#27145

Merged
adityapatwardhan merged 1 commit intoPowerShell:release/v7.4.15from
adityapatwardhan:backport/release/v7.4.15/27056-9c6a012e7
Apr 3, 2026
Merged

[release/v7.4.15] Create infrastructure to create two msixs and msixbundles for LTS and Stable#27145
adityapatwardhan merged 1 commit intoPowerShell:release/v7.4.15from
adityapatwardhan:backport/release/v7.4.15/27056-9c6a012e7

Conversation

@adityapatwardhan
Copy link
Copy Markdown
Member

Backport of #27056 to release/v7.4.15

Triggered by @adityapatwardhan on behalf of @jshigetomi

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
  • Optional tooling change (include reasoning)

Required packaging and pipeline infrastructure update so release/v7.4.15 can build and publish both LTS and Stable MSIX/MSIXBundle artifacts with correct channel selection.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Cherry-pick applied cleanly to release/v7.4.15 with no merge conflicts. The change is already merged and validated on main and has existing successful backport activity for release/v7.6.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Touches packaging/pipeline logic, but changes are scoped and directly align release behavior with already-merged upstream logic for artifact handling.

@adityapatwardhan adityapatwardhan requested a review from a team as a code owner April 1, 2026 23:39
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 23:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backport to release/v7.4.15 that updates Windows packaging/pipeline infrastructure to build and handle both LTS and Stable MSIX/MSIXBundle artifacts in the same run, and to publish the correct bundle for store submissions based on channel selection.

Changes:

  • Update MSIX packaging naming logic so LTS and Stable MSIX outputs can coexist and be distinguished reliably.
  • Build an additional Stable MSIX when both LTS and Stable packaging are requested.
  • Create and publish separate MSIX bundles (LTS vs Stable/Preview), then select the correct bundle for StoreBroker packaging based on channel.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
tools/packaging/packaging.psm1 Adjusts MSIX package name construction to better support parallel LTS + Stable outputs.
.pipelines/templates/packaging/windows/package.yml Builds an additional Stable MSIX when LTS packaging is enabled alongside Stable packaging.
.pipelines/templates/package-create-msix.yml Splits MSIX inputs into LTS vs non-LTS groups, creates two bundles, uploads both, and selects the correct one for store packaging.


$packageName = $ProductName + '-' + $ProductSemanticVersion

# Appends Architecture to the package name
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says the package name suffix appends architecture, but the code appends ProductNameSuffix (which may or may not be architecture). Consider updating the comment to reflect what’s actually appended (e.g., the RID/name suffix like win-x64).

Suggested change
# Appends Architecture to the package name
# Append the product name suffix (e.g., RID/architecture suffix like win-x64) to the package name

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +109
$prefix = ($file.BaseName -split "-win")[0]
$stableBundleName = "$prefix.msixbundle"
Write-Verbose -Verbose "Creating Stable/Preview bundle: $stableBundleName"
& $makeappx bundle /d $stableDir /p "$outputDir\$stableBundleName"
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makeappx bundle is executed via the call operator, which won’t fail the step on non-zero exit codes by default. Wrap this native call with Start-NativeExecution (or check $LASTEXITCODE and throw) so bundling failures reliably fail the pipeline with useful diagnostics.

Copilot uses AI. Check for mistakes.
Comment on lines +117 to +121
$prefix = ($file.BaseName -split "-win")[0]
$ltsBundleName = "$prefix.msixbundle"
Write-Verbose -Verbose "Creating LTS bundle: $ltsBundleName"
& $makeappx bundle /d $ltsDir /p "$outputDir\$ltsBundleName"
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: this makeappx bundle invocation should use Start-NativeExecution (or explicit exit-code handling) to ensure failures stop the job instead of silently continuing.

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +96
# Separate LTS and Stable/Preview MSIX files by filename convention
$ltsMsix = @(Get-ChildItem $sourceDir -Filter '*.msix' | Where-Object { $_.BaseName -match '-LTS-' })
$stableMsix = @(Get-ChildItem $sourceDir -Filter '*.msix' | Where-Object { $_.BaseName -notmatch '-LTS-' })

Write-Verbose -Verbose "Stable/Preview MSIX files: $($stableMsix.Name -join ', ')"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step adds more non-trivial PowerShell logic directly in YAML (file discovery + bundle creation). Consider moving this logic into a reusable PowerShell function (e.g., in tools/ci.psm1 / packaging module) and calling it from YAML to keep the pipeline template easier to maintain and test.

Copilot uses AI. Check for mistakes.
@adityapatwardhan adityapatwardhan merged commit dd226cd into PowerShell:release/v7.4.15 Apr 3, 2026
43 checks passed
@adityapatwardhan adityapatwardhan deleted the backport/release/v7.4.15/27056-9c6a012e7 branch April 3, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants