Skip to content

Commit

Permalink
fix(cmd/install_bin): Get terraform version from Github
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Jun 21, 2023
1 parent e26eeb7 commit d0ff252
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/install_bin/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var Tools = []Tool{
},
{
Name: "terraform",
GetVersionFunc: func() string { return "1.3.2" },
GetVersionFunc: func() string { return github_utils.GetLatestRelease("hashicorp", "terraform") },
UrlTemplate: hashicorpUrlTemplate("terraform"),
},
{
Expand Down Expand Up @@ -313,8 +313,8 @@ var Tools = []Tool{
}

func hashicorpUrlTemplate(name string) string {
return "https://releases.hashicorp.com/" + name + "/{{.Version}}/" + name +
"_{{.Version}}_{{.Os}}_{{.Arch}}.zip"
return "https://releases.hashicorp.com/" + name + "/{{.Version|removev}}/" + name +
"_{{.Version|removev}}_{{.Os}}_{{.Arch}}.zip"
}

func openshiftGetOs(x string) string {
Expand Down

0 comments on commit d0ff252

Please sign in to comment.