change uri (#77)

This commit is contained in:
Oliver King
2023-01-09 12:55:56 -06:00
committed by GitHub
parent ad011b0706
commit bd5ca45a62
2 changed files with 6 additions and 18 deletions

View File

@@ -12,26 +12,14 @@ export function getKubectlArch(): string {
export function getkubectlDownloadURL(version: string, arch: string): string {
switch (os.type()) {
case 'Linux':
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
version,
arch
)
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
case 'Darwin':
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
version,
arch
)
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
case 'Windows_NT':
default:
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
version,
arch
)
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
}
}