Skip to content

Commit 3425148

Browse files
SteveL-MSFTSteve Lee (POWERSHELL HE/HIM) (from Dev Box)
authored andcommitted
Update SBConfig productId
1 parent 100f123 commit 3425148

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.pipelines/DSC-Official.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,11 @@ extends:
524524
throw "PDP path '$pdpPath' does not exist. Cannot update PDP.xml."
525525
}
526526
527+
$sbConfigPath = '$(System.DefaultWorkingDirectory)/DSC/.pipelines/store/SBConfig.json'
528+
if (-not (Test-Path -Path $sbConfigPath)) {
529+
throw "SBConfig path '$sbConfigPath' does not exist. Cannot update SBConfig.json."
530+
}
531+
527532
$pdpContent = Get-Content -Path $pdpPath -Raw
528533
$appName = if ($(isPreRelease) -eq 'true') {
529534
'DesiredStateConfiguration-Preview'
@@ -534,6 +539,16 @@ extends:
534539
Set-Content -Path $pdpPath -Value $pdpContent
535540
Write-Host "PDP.xml updated successfully with AppName: $appName"
536541
542+
$sbConfigContent = Get-Content -Path $sbConfigPath -Raw
543+
$productId = if ($(isPreRelease) -eq 'true') {
544+
'Microsoft.DesiredStateConfiguration-Preview'
545+
} else {
546+
'Microsoft.DesiredStateConfiguration'
547+
}
548+
$sbConfigContent = $sbConfigContent.Replace('$ProductID$', $productId)
549+
Set-Content -Path $sbConfigPath -Value $sbConfigContent
550+
Write-Host "SBConfig.json updated successfully with ProductID: $productId"
551+
537552
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
538553
displayName: Publish to Microsoft Store
539554
inputs:

.pipelines/Store/SBConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"DisableAutoPackageNameFormatting": false
2323
},
2424
"appSubmission": {
25-
"productId": "",
25+
"productId": "$ProductID$",
2626
"targetPublishMode": "Immediate",
2727
"targetPublishDate": null,
2828
"visibility": "NotSet",

0 commit comments

Comments
 (0)