Skip to content

Commit

Permalink
close #2
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilyaev authored Jun 23, 2023
1 parent b5e274b commit 916d341
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ export async function run() {
}

export function getURL(version: string): string {
const arch = os.arch()
switch (os.type()) {
case 'Linux':
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_linux_amd64.tar.gz', version, version)
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_linux_%s.tar.gz', version, version, arch)

case 'Darwin':
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_darwin_amd64.tar.gz', version, version)
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_darwin_%s.tar.gz', version, version, arch)

case 'Windows_NT':
default:
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_windows_amd64.zip', version, version)
return util.format('https://github.com/helmwave/helmwave/releases/download/v%s/helmwave_%s_windows_%s.zip', version, version, arch)
}
}

Expand Down

0 comments on commit 916d341

Please sign in to comment.