Skip to content

Commit

Permalink
Merge pull request #636 from per1234/arm-arch
Browse files Browse the repository at this point in the history
Add support for all Task build architectures
  • Loading branch information
per1234 authored Jan 31, 2023
2 parents bf9d22f + 43e1bb8 commit e26d897
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,15 @@ function computeVersion(version, repoToken) {
});
}
function getFileName() {
var _a;
const platform = osPlat === "win32" ? "windows" : osPlat;
const arch = osArch === "x64" ? "amd64" : "386";
const arches = {
arm: "arm",
arm64: "arm64",
x64: "amd64",
ia32: "386",
};
const arch = (_a = arches[osArch]) !== null && _a !== void 0 ? _a : osArch;
const ext = osPlat === "win32" ? "zip" : "tar.gz";
const filename = util.format("task_%s_%s.%s", platform, arch, ext);
return filename;
Expand Down
8 changes: 7 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ async function computeVersion(

function getFileName() {
const platform: string = osPlat === "win32" ? "windows" : osPlat;
const arch: string = osArch === "x64" ? "amd64" : "386";
const arches = {
arm: "arm",
arm64: "arm64",
x64: "amd64",
ia32: "386",
};
const arch: string = arches[osArch] ?? osArch;
const ext: string = osPlat === "win32" ? "zip" : "tar.gz";
const filename: string = util.format("task_%s_%s.%s", platform, arch, ext);

Expand Down

0 comments on commit e26d897

Please sign in to comment.