Skip to content

Commit

Permalink
amend kubetrim to access compressed binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Gee <[email protected]>
  • Loading branch information
rgee0 authored and alexellis committed Sep 9, 2024
1 parent b0cbf98 commit d3025ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,27 +372,27 @@ func Test_DownloadKubetrim(t *testing.T) {
{os: "mingw64_nt-10.0-18362",
arch: arch64bit,
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim.exe"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim.exe.tgz"},
{os: "darwin",
arch: arch64bit,
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-darwin"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-darwin.tgz"},
{os: "darwin",
arch: archDarwinARM64,
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-darwin-arm64"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-darwin-arm64.tgz"},
{os: "linux",
arch: arch64bit,
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim.tgz"},
{os: "linux",
arch: "armv7l",
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-armhf"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-armhf.tgz"},
{os: "linux",
arch: archARM64,
version: "0.8.28",
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-arm64"},
url: "https://github.com/alexellis/kubetrim/releases/download/0.8.28/kubetrim-arm64.tgz"},
}
for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
Expand Down
12 changes: 6 additions & 6 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,19 @@ https://dl.k8s.io/release/{{.Version}}/bin/{{$os}}/{{$arch}}/kubectl{{$ext}}`})
Name: "kubetrim",
Description: "Tidy up old Kubernetes clusters from kubeconfig.",
BinaryTemplate: `{{ if HasPrefix .OS "ming" -}}
{{.Name}}.exe
{{.Name}}.exe.tgz
{{- else if eq .OS "darwin" -}}
{{ if eq .Arch "arm64" -}}
{{.Name}}-darwin-arm64
{{.Name}}-darwin-arm64.tgz
{{- else -}}
{{.Name}}-darwin
{{.Name}}-darwin.tgz
{{- end -}}
{{- else if eq .Arch "armv7l" -}}
{{.Name}}-armhf
{{.Name}}-armhf.tgz
{{- else if eq .Arch "aarch64" -}}
{{.Name}}-arm64
{{.Name}}-arm64.tgz
{{- else -}}
{{.Name}}
{{.Name}}.tgz
{{- end -}}`,
})

Expand Down

0 comments on commit d3025ca

Please sign in to comment.