From b115578ff2ea36e03e139698dbb086b8c2c3bb08 Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Sat, 13 Apr 2024 10:01:52 +0100 Subject: [PATCH] add support for defining the ring/channel --- uup-dump-get-windows-iso.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/uup-dump-get-windows-iso.ps1 b/uup-dump-get-windows-iso.ps1 index 8cc7dcf..0ce1f65 100644 --- a/uup-dump-get-windows-iso.ps1 +++ b/uup-dump-get-windows-iso.ps1 @@ -127,15 +127,20 @@ function Get-UupDumpIso($name, $target) { } ` | Where-Object { # only return builds that: - # 1. are from the retail channel + # 1. are from the expected ring/channel (default retail) # 2. have the english language # 3. match the requested edition $ring = $_.Value.info.ring $langs = $_.Value.langs.PSObject.Properties.Name $editions = $_.Value.editions.PSObject.Properties.Name $result = $true - if ($ring -ne 'RETAIL') { - Write-Host "Skipping. Expected ring=RETAIL. Got ring=$ring." + $expectedRing = if ($target.ring) { + $target.ring + } else { + 'RETAIL' + } + if ($ring -ne $expectedRing) { + Write-Host "Skipping. Expected ring=$expectedRing. Got ring=$ring." $result = $false } if ($langs -notcontains 'en-us') {