Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 22f750e

Browse files
committed
Fix check for SDK version
1 parent 3cb7451 commit 22f750e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ $repositories | ForEach-Object {
128128
}
129129

130130
$sdkVersion = (cmake -P .\packages\pico-setup-windows\pico-sdk-version.cmake -N | Select-String -Pattern 'PICO_SDK_VERSION_STRING=(.*)$').Matches.Groups[1].Value
131-
$sdkVersion -match $versionRegEx
131+
if (-not ($sdkVersion -match $versionRegEx)) {
132+
Write-Error 'Could not determine Pico SDK version.'
133+
}
132134
$sdkVersionClean = $Matches[0]
133135
$product = "Raspberry Pi Pico SDK v$sdkVersion"
134136
$productDir = "Raspberry Pi\Pico SDK v$sdkVersion"
@@ -261,7 +263,7 @@ VIAddVersionKey "ProductVersion" "$sdkVersion"
261263
VIAddVersionKey "LegalCopyright" "$company"
262264
VIAddVersionKey "CompanyName" "$company"
263265
VIFileVersion $version.0
264-
VIProductVersion $sdkVersion.0
266+
VIProductVersion $sdkVersionClean.0
265267
266268
; Since we're packaging up a bunch of installers, the "Space required" shown is inaccurate
267269
SpaceTexts "none"

0 commit comments

Comments
 (0)