Merge pull request #332 - update download link fix

#minor
This commit is contained in:
gadotroee
2021-10-07 19:45:05 +03:00
committed by GitHub

View File

@@ -9,6 +9,7 @@ import (
"io/ioutil"
"net/http"
"runtime"
"strings"
"time"
"github.com/google/go-github/v37/github"
@@ -77,7 +78,7 @@ func CheckNewerVersion(versionChan chan string) {
logger.Log.Debugf("Finished version validation, github version %v, current version %v, took %v", gitHubVersion, currentSemVer, time.Since(start))
if gitHubVersionSemVer.GreaterThan(currentSemVer) {
versionChan <- fmt.Sprintf("Update available! %v -> %v (curl -Lo mizu %v/mizu_%s_amd64 && chmod 755 mizu)", mizu.SemVer, gitHubVersion, *latestRelease.HTMLURL, runtime.GOOS)
versionChan <- fmt.Sprintf("Update available! %v -> %v (curl -Lo mizu %v/mizu_%s_amd64 && chmod 755 mizu)", mizu.SemVer, gitHubVersion, strings.Replace(*latestRelease.HTMLURL, "tag", "download", 1), runtime.GOOS)
} else {
versionChan <- ""
}