Skip to content

Commit

Permalink
Better handling of the SDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
ndabas committed Nov 24, 2022
1 parent 652a657 commit 3964bd6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ mkdirp "bin"
}
}

$sdkVersion = (.\build\cmake\bin\cmake.exe -P .\packages\pico-setup-windows\pico-sdk-version.cmake -N | Select-String -Pattern '([0-9]+\.)+[0-9]+').Matches.Value
$product = "Raspberry Pi Pico SDK $sdkVersion"

$repositories | ForEach-Object {
$repodir = Join-Path 'build' ([IO.Path]::GetFileNameWithoutExtension($_.href))

Expand All @@ -109,6 +106,12 @@ $repositories | ForEach-Object {
}
}

$sdkVersion = (.\build\cmake\bin\cmake.exe -P .\packages\pico-setup-windows\pico-sdk-version.cmake -N | Select-String -Pattern 'PICO_SDK_VERSION_STRING=(.*)$').Matches.Groups[1].Value
$product = "Raspberry Pi Pico SDK $sdkVersion"

Write-Host "SDK version: $sdkVersion"
Write-Host "Installer version: $version"

if (-not (Test-Path $MSYS2Path)) {
Write-Host 'Extracting MSYS2'
exec { & .\downloads\msys2.exe -y "-o$(Resolve-Path (Split-Path $MSYS2Path -Parent))" }
Expand Down

0 comments on commit 3964bd6

Please sign in to comment.