diff --git a/data/0.15.0/github-cache.json b/data/0.15.0/github-cache.json index 66d5284..6a52a8b 100644 --- a/data/0.15.0/github-cache.json +++ b/data/0.15.0/github-cache.json @@ -261,8 +261,59 @@ "assetsUrl": "https://api.github.com/repos/ninja-build/ninja/releases/155357494/assets" }, "githubApiCache-3-0": [ + "v1.5.1-0", "v2.0.0-0" ], + "githubApiCache-3-1-v1.5.1-0": { + "assets": [ + { + "id": 184737292, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 184736619, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 184739207, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 184736698, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 184739206, + "name": "pico-sdk-tools-1.5.1-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/pico-sdk-tools-1.5.1-x64-win.zip" + }, + { + "id": 184737290, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 184736618, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-mac.zip" + }, + { + "id": 184739208, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-x64-win.zip" + }, + { + "id": 184736697, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/169373034/assets" + }, "githubApiCache-3-1-v2.0.0-0": { "assets": [ { @@ -324,6 +375,11 @@ "id": 184709988, "name": "picotool-2.0.0-x86_64-lin.tar.gz", "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/picotool-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 184716562, + "name": "riscv-toolchain-14-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/riscv-toolchain-14-aarch64-lin.tar.gz" } ], "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/169351844/assets" diff --git a/scripts/genCache.py b/scripts/genCache.py index 55d5f5a..b93afb0 100644 --- a/scripts/genCache.py +++ b/scripts/genCache.py @@ -50,7 +50,7 @@ ["1.5.1", "2.0.0"], ["v3.28.6", "v3.29.6"], ["v1.12.1"], - ["v2.0.0-0"], + ["v1.5.1-0", "v2.0.0-0"], ] headers = { diff --git a/src/utils/download.mts b/src/utils/download.mts index cb1f749..c71950c 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -46,7 +46,7 @@ const TOOLS_PLATFORMS: { [key: string]: string } = { /// Release tags for the sdk tools const TOOLS_RELEASES: { [key: string]: string } = { // eslint-disable-next-line @typescript-eslint/naming-convention - "1.5.1": "v1.5.1-1", + "1.5.1": "v1.5.1-0", // eslint-disable-next-line @typescript-eslint/naming-convention "2.0.0": "v2.0.0-0", }; @@ -531,6 +531,13 @@ async function downloadAndInstallGithubAsset( export async function downloadAndInstallTools( version: string ): Promise { + if (parseInt(version.split('.')[0]) < 2) { + if (process.platform !== "win32") { + Logger.log(`Skipping tools install not on Windows for pre-2.0.0 SDK.`); + + return true; + } + } const assetExt: string = process.platform === "linux" ? "tar.gz" : "zip"; const targetDirectory = buildToolsPath(version); const archiveFileName = `sdk-tools.${assetExt}`;