Install arm64 babashka in arm64 runners

This commit is contained in:
Wes Morgan 2022-08-26 14:42:58 -06:00
parent 75e4242836
commit ad55de5e88
No known key found for this signature in database
GPG Key ID: 5639E4CBFA17DC84

View File

@ -27,13 +27,21 @@ export async function getLatestBabashka(githubAuth?: string): Promise<string> {
export function getArtifactName(version: string): string {
const platform = os.platform()
let arch
switch (os.arch()) {
case 'x64':
arch = 'amd64'
case 'arm64':
arch = 'aarch64'
}
switch (platform) {
case 'win32':
return `babashka-${version}-windows-amd64.zip`
return `babashka-${version}-windows-${arch}.zip`
case 'darwin':
return `babashka-${version}-macos-amd64.tar.gz`
return `babashka-${version}-macos-${arch}.tar.gz`
default:
return `babashka-${version}-linux-amd64-static.tar.gz`
return `babashka-${version}-linux-${arch}-static.tar.gz`
}
}