Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmd/goblin-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,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
2 changes: 1 addition & 1 deletion templates/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ start() {
install "$tmp" "$prefix"
else
log_info "Permissions required for installation to $prefix — alternatively specify a new directory with:"
log_info " $ curl -sf https://gobinaries.com/$pkg@$version | PREFIX=. sh"
log_info " $ curl -sf https://goblin.reaper.im/$pkg@$version | PREFIX=. sh"
sudo install "$tmp" "$prefix"
fi

Expand Down