Skip to content

Commit

Permalink
Fix Windows template for K9s
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Sep 14, 2023
1 parent 60b4162 commit 5a86ed7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ func Test_DownloadK9s(t *testing.T) {
{os: "ming",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/derailed/k9s/releases/download/v0.24.10/k9s_Windows_amd64.tar.gz`,
url: `https://github.com/derailed/k9s/releases/download/v0.24.10/k9s_Windows_amd64.zip`,
},
{os: "linux",
arch: arch64bit,
Expand Down
8 changes: 7 additions & 1 deletion pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,12 @@ https://github.com/inlets/inletsctl/releases/download/{{.Version}}/{{$fileName}}
Name: "k9s",
Description: "Provides a terminal UI to interact with your Kubernetes clusters.",
BinaryTemplate: `
{{$extStr := "tar.gz"}}
{{ if HasPrefix .OS "ming" -}}
{{$extStr = "zip"}}
{{- end -}}
{{$os := "" }}
{{ if HasPrefix .OS "ming" -}}
{{$os = "Windows"}}
Expand All @@ -748,7 +754,7 @@ https://github.com/inlets/inletsctl/releases/download/{{.Version}}/{{$fileName}}
{{$arch = "arm"}}
{{- end -}}
{{.Name}}_{{$os}}_{{$arch}}.tar.gz`,
{{.Name}}_{{$os}}_{{$arch}}.{{$extStr}}`,
})

tools = append(tools,
Expand Down

0 comments on commit 5a86ed7

Please sign in to comment.