Add support for all Task build architectures · arduino/setup-task@43e1bb8 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -146,8 +146,15 @@ function computeVersion(version, repoToken) {
146 146 });
147 147 }
148 148 function getFileName() {
149 +var _a;
149 150 const platform = osPlat === "win32" ? "windows" : osPlat;
150 -const arch = osArch === "x64" ? "amd64" : "386";
151 +const arches = {
152 +arm: "arm",
153 +arm64: "arm64",
154 +x64: "amd64",
155 +ia32: "386",
156 +};
157 +const arch = (_a = arches[osArch]) !== null && _a !== void 0 ? _a : osArch;
151 158 const ext = osPlat === "win32" ? "zip" : "tar.gz";
152 159 const filename = util.format("task_%s_%s.%s", platform, arch, ext);
153 160 return filename;
Original file line number Diff line number Diff line change
@@ -136,7 +136,13 @@ async function computeVersion(
136 136
137 137 function getFileName() {
138 138 const platform: string = osPlat === "win32" ? "windows" : osPlat;
139 -const arch: string = osArch === "x64" ? "amd64" : "386";
139 +const arches = {
140 +arm: "arm",
141 +arm64: "arm64",
142 +x64: "amd64",
143 +ia32: "386",
144 +};
145 +const arch: string = arches[osArch] ?? osArch;
140 146 const ext: string = osPlat === "win32" ? "zip" : "tar.gz";
141 147 const filename: string = util.format("task_%s_%s.%s", platform, arch, ext);
142 148