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