From 0412feee72173ed1aa2ddd626f50ad132aa1892e Mon Sep 17 00:00:00 2001 From: Dabo Xu Date: Sat, 22 Apr 2023 06:03:29 -0700 Subject: [PATCH] feat: update arch for fetching binarys (#517) --- packages/protoc/util.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/packages/protoc/util.js b/packages/protoc/util.js index fc7c45ff..4f0fa4ba 100644 --- a/packages/protoc/util.js +++ b/packages/protoc/util.js @@ -159,14 +159,16 @@ function httpGet(url, redirects) { */ /** - * protoc-3.13.0-linux-aarch_64.zip - * protoc-3.13.0-linux-ppcle_64.zip - * protoc-3.13.0-linux-s390x.zip - * protoc-3.13.0-linux-x86_32.zip - * protoc-3.13.0-linux-x86_64.zip - * protoc-3.13.0-osx-x86_64.zip - * protoc-3.13.0-win32.zip - * protoc-3.13.0-win64.zip + * protoc-22.3-linux-aarch_64.zip + * protoc-22.3-linux-ppcle_64.zip + * protoc-22.3-linux-s390_64.zip + * protoc-22.3-linux-x86_32.zip + * protoc-22.3-linux-x86_64.zip + * protoc-22.3-osx-aarch_64.zip + * protoc-22.3-osx-universal_binary.zip + * protoc-22.3-osx-x86_64.zip + * protoc-22.3-win32.zip + + protoc-22.3-win64.zip * * @param {ReleaseParameters} params * @return {string} @@ -175,19 +177,27 @@ module.exports.makeReleaseName = function makeReleaseName(params) { let build = `${params.platform}-${params.arch}`; switch (params.platform) { case "darwin": - build = 'osx-x86_64' + if (params.arch === "arm64") { + build = 'osx-aarch_64' + } else if (params.arch === "x64") { + build = 'osx-x86_64' + } else { + build = 'osx-universal_binary' + } break; case "linux": if (params.arch === "x64") { build = 'linux-x86_64' } else if (params.arch === "x32") { build = 'linux-x86_32' + } else if (params.arch === "arm64") { + build = 'linux-aarch_64' } break; case "win32": if (params.arch === "x64") { build = 'win64' - } else if (params.arch === "x32") { + } else if (params.arch === "x32" || params.arch === "ia32") { build = 'win32' } break;