File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,14 @@ if ($msixFiles.Count -eq 0) {
5555Write-Host " Found $ ( $msixFiles.Count ) .msix package(s):"
5656$msixFiles | ForEach-Object { Write-Host " $_ " }
5757
58+ if ($Version -eq " " -and $PackageManifestPath -ne " " -and (Test-Path $PackageManifestPath )) {
59+ [xml ]$versionManifest = Get-Content $PackageManifestPath
60+ $Version = $versionManifest.Package.Identity.Version
61+ Write-Host " Version from manifest: $Version "
62+ }
5863if ($Version -eq " " ) {
5964 $Version = $msixFiles [0 ].BaseName -replace ' ^[^_]+_([^_]+)_.*$' , ' $1'
60- Write-Host " Detected version: $Version "
65+ Write-Host " Detected version from filename : $Version "
6166}
6267
6368$platformList = $msixFiles | ForEach-Object { $_.BaseName -replace ' .*_(\w+)$' , ' $1' } | Sort-Object - Descending
@@ -74,7 +79,7 @@ $bundlePath = Join-Path $AppxPackageDir "$BundleName.msixbundle"
7479if (Test-Path $bundlePath ) { Remove-Item $bundlePath - Force }
7580
7681Write-Host " Creating msixbundle at: $bundlePath "
77- & $makeAppx.FullName bundle / d $mappingDir / p $bundlePath / o
82+ & $makeAppx.FullName bundle / d $mappingDir / p $bundlePath / bv $Version / o
7883if ($LASTEXITCODE -ne 0 ) {
7984 Write-Error " MakeAppx bundle creation failed with exit code $LASTEXITCODE "
8085 exit 1
You can’t perform that action at this time.
0 commit comments