Skip to content

Commit

Permalink
add default originalVersion for script to infer
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Feb 6, 2022
1 parent 9c62503 commit e14211f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/goblin-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ func fetchInstallScript(rw http.ResponseWriter, req *http.Request) {
return
}

// == mark default to latest version when nothing is provided ==
// this has be separated and put here since `latest` might actually
// be a tag provided to the package
// and could be then used, so using the branch name
// makes no sense when working with go proxy instead of
// github for example
if len(version) == 0 {
version = "latest"
}

render(rw, "install.sh", struct {
URL string
Package string
Expand Down

0 comments on commit e14211f

Please sign in to comment.