From a8bf670697c39bac40dbff4054c772a73980d9aa Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sat, 20 Mar 2021 23:20:07 +0000 Subject: [PATCH] dont log updates when disabled --- .drone.yml | 6 +++--- updater.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index fe56935..3a78f76 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,9 +20,9 @@ steps: - apt install build-essential python3-pip curl software-properties-common sed upx -y - (curl -sL https://deb.nodesource.com/setup_14.x | bash -) - apt install nodejs - - curl -sL https://git.io/goreleaser > goreleaser - - chmod +x goreleaser - - ./scripts/version.sh ./goreleaser + - curl -sL https://git.io/goreleaser > ../goreleaser + - chmod +x ../goreleaser + - ./scripts/version.sh ../goreleaser - wget https://builds.hrfee.pw/upload.py -P ../ - pip3 install requests - bash -c 'python3 ../upload.py https://builds.hrfee.pw hrfee jfa-go --tag internal=true' diff --git a/updater.go b/updater.go index 39978ea..32e4d2a 100644 --- a/updater.go +++ b/updater.go @@ -467,7 +467,7 @@ func (app *appContext) checkForUpdates() { if status != 200 || err != nil { if err != nil && strings.Contains(err.Error(), "strconv.ParseInt") { app.err.Println("No new updates available.") - } else { + } else if status != -1 { // -1 means updates disabled, we don't need to log it. app.err.Printf("Failed to get latest tag (%d): %v", status, err) } return