Skip to content

Commit

Permalink
Fix clusterawsadm and cmctl CLI tools
Browse files Browse the repository at this point in the history
Both renamed their release filenames, and were fixed in
unit tests and tools.go

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Apr 29, 2024
1 parent 64200e7 commit ebceee8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5797,31 +5797,31 @@ func Test_DownloaClusterawsadm(t *testing.T) {
os: "linux",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm-linux-amd64`,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm_v2.0.2_linux_amd64`,
},
{
os: "darwin",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm-darwin-amd64`,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm_v2.0.2_darwin_amd64`,
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm-linux-arm64`,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm_v2.0.2_linux_arm64`,
},
{
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm-darwin-arm64`,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm_v2.0.2_darwin_arm64`,
},
{
os: "ming",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm-windows-amd64.exe`,
url: `https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.0.2/clusterawsadm_v2.0.2_windows_amd64.exe`,
},
}

Expand Down Expand Up @@ -6136,44 +6136,44 @@ func Test_DownloadCmctl(t *testing.T) {

tool := getTool(name, tools)

const toolVersion = "v1.11.0"
const toolVersion = "v1.14.5"

tests := []test{
{
os: "linux",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-linux-amd64.tar.gz`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-amd64.tar.gz`,
},
{
os: "darwin",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-darwin-amd64.tar.gz`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-darwin-amd64.tar.gz`,
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-linux-arm64.tar.gz`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-arm64.tar.gz`,
},
{
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-darwin-arm64.tar.gz`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-darwin-arm64.tar.gz`,
},
{
os: "linux",
arch: archARM7,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-linux-arm.tar.gz`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-arm.tar.gz`,
},
{
os: "ming",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cmctl-windows-amd64.zip`,
url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-windows-amd64.zip`,
},
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -3413,11 +3413,11 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}}
{{$ext = ".exe"}}
{{- end -}}
clusterawsadm-{{$os}}-{{$arch}}{{$ext}}
clusterawsadm_{{.Version}}_{{$os}}_{{$arch}}{{$ext}}
`,
})

// https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.5.0/clusterawsadm-v2.5.0-linux_amd64
// https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.5.0/clusterawsadm_v2.5.0_linux_amd64
tools = append(tools,
Tool{
Owner: "schollz",
Expand Down Expand Up @@ -3581,7 +3581,7 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}}
{{$os = "windows"}}
{{$ext = "zip"}}
{{- end -}}
cmctl-{{$os}}-{{$arch}}.{{$ext}}
cert-manager-cmctl-{{$os}}-{{$arch}}.{{$ext}}
`,
})

Expand Down

0 comments on commit ebceee8

Please sign in to comment.