Skip to content

Commit e6cf96a

Browse files
committed
Update SBConfig productId
1 parent b0b03ab commit e6cf96a

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
@@ -505,6 +505,11 @@ extends:
505505
throw "PDP path '$pdpPath' does not exist. Cannot update PDP.xml."
506506
}
507507
508+
$sbConfigPath = '$(System.DefaultWorkingDirectory)/DSC/.pipelines/store/SBConfig.json'
509+
if (-not (Test-Path -Path $sbConfigPath)) {
510+
throw "SBConfig path '$sbConfigPath' does not exist. Cannot update SBConfig.json."
511+
}
512+
508513
$pdpContent = Get-Content -Path $pdpPath -Raw
509514
$appName = if ($(isPreRelease) -eq 'true') {
510515
'DesiredStateConfiguration-Preview'
@@ -515,6 +520,16 @@ extends:
515520
Set-Content -Path $pdpPath -Value $pdpContent
516521
Write-Host "PDP.xml updated successfully with AppName: $appName"
517522
523+
$sbConfigContent = Get-Content -Path $sbConfigPath -Raw
524+
$productId = if ($(isPreRelease) -eq 'true') {
525+
'Microsoft.DesiredStateConfiguration-Preview'
526+
} else {
527+
'Microsoft.DesiredStateConfiguration'
528+
}
529+
$sbConfigContent = $sbConfigContent.Replace('$ProductID$', $productId)
530+
Set-Content -Path $sbConfigPath -Value $sbConfigContent
531+
Write-Host "SBConfig.json updated successfully with ProductID: $productId"
532+
518533
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
519534
displayName: Publish to Microsoft Store
520535
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)