[release/v7.5.6] Create infrastructure to create two msixs and msixbundles for LTS and Stable by adityapatwardhan · Pull Request #27165 · PowerShell/PowerShell · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 65 additions & 13 deletions .pipelines/templates/package-create-msix.yml
8 changes: 8 additions & 0 deletions .pipelines/templates/packaging/windows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ jobs:

# Don't build LTS packages for rebuild branches
$LTS = $metadata.LTSRelease.Package -and -not $isRebuildBranch
$Stable = [bool]$metadata.StableRelease.Package

if ($isRebuildBranch) {
Write-Verbose -Message "Rebuild branch detected, skipping LTS package build" -Verbose
}

Write-Verbose -Verbose "LTS: $LTS"
Write-Verbose -Verbose "Stable: $Stable"

if ($LTS) {
Write-Verbose -Message "LTS Release: $LTS"
Expand Down Expand Up @@ -175,6 +177,12 @@ jobs:

Start-PSPackage -Type $packageTypes -SkipReleaseChecks -WindowsRuntime $WindowsRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS:$LTS

# When both LTS and Stable are requested, also build the Stable MSIX
if ($packageTypes -contains 'msix' -and $LTS -and $Stable) {
Write-Verbose -Verbose "Both LTS and Stable packages requested. Building additional Stable MSIX."
Start-PSPackage -Type msix -SkipReleaseChecks -WindowsRuntime $WindowsRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath
}

displayName: 'Build Packages (Unsigned)'
env:
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
Expand Down
19 changes: 8 additions & 11 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4257,18 +4257,8 @@ function New-MSIXPackage

$makepri = Get-Item (Join-Path $makeappx.Directory "makepri.exe") -ErrorAction Stop

$displayName = $ProductName
$ProductSemanticVersion = Get-PackageSemanticVersion -Version $ProductVersion
$productSemanticVersionWithName = $ProductName + '-' + $ProductSemanticVersion
$packageName = $productSemanticVersionWithName
if ($Private) {
$ProductNameSuffix = 'Private'
}

if ($ProductNameSuffix) {
$packageName += "-$ProductNameSuffix"
}

$displayName = $productName

if ($Private) {
$ProductName = 'PowerShell-Private'
Expand All @@ -4284,6 +4274,13 @@ function New-MSIXPackage
Write-Verbose -Verbose "ProductName: $productName"
Write-Verbose -Verbose "DisplayName: $displayName"

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

# Appends Architecture to the package name
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The comment says this appends the architecture, but $ProductNameSuffix here is a runtime/name suffix (e.g., win-x64, win-arm64) coming from Start-PSPackage. Updating the comment to reflect the actual value will avoid confusion for future maintainers.

Suggested change

Copilot uses AI. Check for mistakes.
if ($ProductNameSuffix) {
$packageName += "-$ProductNameSuffix"
}

$ProductVersion = Get-WindowsVersion -PackageName $packageName

# Any app that is submitted to the Store must have a PhoneIdentity in its appxmanifest.
Expand Down
Loading