7
7
$architecture = ' current' ,
8
8
[switch ]$Clippy ,
9
9
[switch ]$SkipBuild ,
10
- [ValidateSet (' msix' , ' msixbundle' , ' tgz' , ' zip' )]
10
+ [ValidateSet (' msix' , ' msix-private ' , ' msixbundle' , ' tgz' , ' zip' )]
11
11
$packageType ,
12
12
[switch ]$Test ,
13
13
[switch ]$GetPackageVersion ,
@@ -422,7 +422,7 @@ if ($packageType -eq 'msixbundle') {
422
422
$msixPath = Join-Path $PSScriptRoot ' bin' ' msix'
423
423
& $makeappx bundle / d $msixPath / p " $PSScriptRoot \bin\$packageName .msixbundle"
424
424
return
425
- } elseif ($packageType -eq ' msix' ) {
425
+ } elseif ($packageType -eq ' msix' -or $packageType -eq ' msix-private ' ) {
426
426
if (! $IsWindows ) {
427
427
throw " MSIX is only supported on Windows"
428
428
}
@@ -431,21 +431,34 @@ if ($packageType -eq 'msixbundle') {
431
431
throw ' MSIX requires a specific architecture'
432
432
}
433
433
434
+ $isPrivate = $packageType -eq ' msix-private'
435
+
434
436
$makeappx = Find-MakeAppx
435
437
$makepri = Get-Item (Join-Path $makeappx.Directory " makepri.exe" ) - ErrorAction Stop
436
438
$displayName = " DesiredStateConfiguration"
437
439
$isPreview = $productVersion -like ' *-*'
438
440
$productName = " DesiredStateConfiguration"
439
441
if ($isPreview ) {
440
442
Write-Verbose - Verbose " Preview version detected"
441
- $productName += " -Preview"
443
+ if ($isPrivate ) {
444
+ $productName += " -Private"
445
+ }
446
+ else {
447
+ $productName += " -Preview"
448
+ }
442
449
# save preview number
443
450
$previewNumber = $productVersion -replace ' .*?-[a-z]+\.([0-9]+)' , ' $1'
444
451
# remove label from version
445
452
$productVersion = $productVersion.Split (' -' )[0 ]
446
453
# replace revision number with preview number
447
454
$productVersion = $productVersion -replace ' (\d+)$' , " $previewNumber .0"
448
- $displayName += " -Preview"
455
+
456
+ if ($isPrivate ) {
457
+ $displayName += " -Private"
458
+ }
459
+ else {
460
+ $displayName += " -Preview"
461
+ }
449
462
}
450
463
Write-Verbose - Verbose " Product version is $productVersion "
451
464
$arch = if ($architecture -eq ' aarch64-pc-windows-msvc' ) { ' arm64' } else { ' x64' }
@@ -517,7 +530,7 @@ if ($packageType -eq 'msixbundle') {
517
530
throw " Failed to create msix package"
518
531
}
519
532
520
- Write-Host - ForegroundColor Green " `n MSIX package is created at $packageName .msix "
533
+ Write-Host - ForegroundColor Green " `n MSIX package is created at $packageName "
521
534
} elseif ($packageType -eq ' zip' ) {
522
535
$zipTarget = Join-Path $PSScriptRoot ' bin' $architecture ' zip'
523
536
if (Test-Path $zipTarget ) {
0 commit comments