Skip to content

Commit

Permalink
Add 1.5.1 tools support back
Browse files Browse the repository at this point in the history
  • Loading branch information
will-v-pi committed Aug 8, 2024
1 parent 944fe51 commit 9600444
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
56 changes: 56 additions & 0 deletions data/0.15.0/github-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/genCache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
9 changes: 8 additions & 1 deletion src/utils/download.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Expand Down Expand Up @@ -531,6 +531,13 @@ async function downloadAndInstallGithubAsset(
export async function downloadAndInstallTools(
version: string
): Promise<boolean> {
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}`;
Expand Down

0 comments on commit 9600444

Please sign in to comment.