|
|
@ -161,6 +161,7 @@ func newUpdater(buildroneURL, namespace, repo, version, commit, buildType string
|
|
|
|
if runtime.GOOS == "windows" {
|
|
|
|
if runtime.GOOS == "windows" {
|
|
|
|
binary += ".exe"
|
|
|
|
binary += ".exe"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println("monitoring", tag)
|
|
|
|
return &Updater{
|
|
|
|
return &Updater{
|
|
|
|
httpClient: &http.Client{Timeout: 10 * time.Second},
|
|
|
|
httpClient: &http.Client{Timeout: 10 * time.Second},
|
|
|
|
timeoutHandler: common.NewTimeoutHandler("updater", buildroneURL, true),
|
|
|
|
timeoutHandler: common.NewTimeoutHandler("updater", buildroneURL, true),
|
|
|
@ -211,7 +212,7 @@ func (ud *Updater) GetTag() (Tag, int, error) {
|
|
|
|
var tag Tag
|
|
|
|
var tag Tag
|
|
|
|
err = json.Unmarshal(body, &tag)
|
|
|
|
err = json.Unmarshal(body, &tag)
|
|
|
|
if tag.Version == "" {
|
|
|
|
if tag.Version == "" {
|
|
|
|
err = errors.New("Tag was empty")
|
|
|
|
err = errors.New("Tag at \"" + url + "\" was empty")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return tag, resp.StatusCode, err
|
|
|
|
return tag, resp.StatusCode, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|