Skip to content

Commit becb4d9

Browse files
SteveL-MSFTTravisEz13
authored andcommitted
Update MSIX packaging so the version to Store requirements (PowerShell#10588)
update packaging msix so version conforms to Store requirment
1 parent 0e975a5 commit becb4d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/packaging/packaging.psm1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,6 +2814,17 @@ function New-MSIXPackage
28142814
$ProductVersion += ".0"
28152815
}
28162816

2817+
# The Store requires the last digit of the version to be 0 so we swap the build and revision
2818+
# This only affects Preview versions where the last digit is the preview number
2819+
# For stable versions, the last digit is already zero so no changes
2820+
$pversion = [version]$ProductVersion
2821+
if ($pversion.Revision -ne 0) {
2822+
$pversion = [version]::new($pversion.Major, $pversion.Minor, $pversion.Revision, 0)
2823+
$ProductVersion = $pversion.ToString()
2824+
}
2825+
2826+
Write-Verbose "Version: $productversion" -Verbose
2827+
28172828
# Appx manifest needs to be in root of source path, but the embedded version needs to be updated
28182829
$appxManifest = Get-Content "$RepoRoot\assets\AppxManifest.xml" -Raw
28192830
$appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion)

0 commit comments

Comments
 (0)