Skip to content

Commit

Permalink
Update tool defintion for viddy
Browse files Browse the repository at this point in the history
Breaking changes detected via e2e tests and fixed

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Aug 27, 2024
1 parent 568ded2 commit 34ca06f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 5 additions & 5 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5629,31 +5629,31 @@ func Test_DownloadViddy(t *testing.T) {
os: "darwin",
arch: arch64bit,
version: version,
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy_Darwin_x86_64.tar.gz",
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy-v0.3.6-macos-x86_64.tar.gz",
},
{
os: "darwin",
arch: archDarwinARM64,
version: version,
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy_Darwin_arm64.tar.gz",
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy-v0.3.6-macos-arm64.tar.gz",
},
{
os: "linux",
arch: arch64bit,
version: version,
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy_Linux_x86_64.tar.gz",
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy-v0.3.6-linux-x86_64.tar.gz",
},
{
os: "linux",
arch: archARM64,
version: version,
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy_Linux_arm64.tar.gz",
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy-v0.3.6-linux-arm64.tar.gz",
},
{
os: "ming",
arch: arch64bit,
version: version,
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy_Windows_x86_64.tar.gz",
url: "https://github.com/sachaos/viddy/releases/download/v0.3.6/viddy-v0.3.6-windows-x86_64.tar.gz",
},
}

Expand Down
10 changes: 4 additions & 6 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -3167,16 +3167,14 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
{{$arch = "arm64"}}
{{- end -}}
{{$osStr := ""}}
{{$osStr := .OS}}
{{ if HasPrefix .OS "ming" -}}
{{$osStr = "Windows"}}
{{- else if eq .OS "linux" -}}
{{$osStr = "Linux"}}
{{$osStr = "windows"}}
{{- else if eq .OS "darwin" -}}
{{$osStr = "Darwin"}}
{{$osStr = "macos"}}
{{- end -}}
{{.Name}}_{{$osStr}}_{{$arch}}.{{$ext}}
{{.Name}}-{{.Version}}-{{$osStr}}-{{$arch}}.{{$ext}}
`,
})

Expand Down

0 comments on commit 34ca06f

Please sign in to comment.