Skip to content

Commit 9f12dbc

Browse files
committed
Keep release metadata channels in sync
- Add missing desktop/channel entries to release metadata during desktop builds - Include stable in 4.3.3+87 release metadata
1 parent d109bd1 commit 9f12dbc

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

release/metadata/4.3.3+87.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"mandatory": false,
88
"channels": [
99
"desktop",
10-
"prerelease"
10+
"prerelease",
11+
"stable"
1112
],
1213
"platforms": [
1314
"windows"

scripts/build_desktop_release.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ if (-not (Test-Path $metadataPath)) {
6565
$metadata | ConvertTo-Json -Depth 6 | Set-Content -Path $metadataPath
6666
Write-Host "Created release metadata at $metadataPath"
6767
}
68+
else {
69+
$metadata = Get-Content $metadataPath -Raw | ConvertFrom-Json
70+
$channels = @($metadata.channels)
71+
$requiredChannels = @("desktop", $Channel)
72+
$missingChannels = @($requiredChannels | Where-Object { $channels -notcontains $_ })
73+
74+
if ($missingChannels.Count -gt 0) {
75+
$metadata.channels = @($channels + $missingChannels)
76+
$metadata | ConvertTo-Json -Depth 6 | Set-Content -Path $metadataPath
77+
Write-Host ("Updated release metadata channels at {0}: {1}" -f $metadataPath, ($metadata.channels -join ", "))
78+
}
79+
}
6880

6981
$channelRoot = Resolve-RepoPath -RepoRoot $repoRoot -RelativePath ("{0}\updates\windows\{1}" -f $PagesStageRoot, $Channel)
7082
New-Item -ItemType Directory -Force -Path $channelRoot | Out-Null

0 commit comments

Comments
 (0)