From ff4be34c9bcbdc1dda827b4fc7f727ec54c7008a Mon Sep 17 00:00:00 2001 From: matryer Date: Mon, 8 Mar 2021 18:55:20 +0000 Subject: [PATCH] fixed update logic --- app/app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 58568d7bc..beac81ace 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "path/filepath" + "strings" "sync" "time" @@ -433,7 +434,8 @@ func (a *app) checkForUpdates(passive bool) { LatestReleaseGitHubEndpoint: "https://api.github.com/repos/matryer/xbar/releases/latest", Client: &http.Client{Timeout: 10 * time.Minute}, SelectAsset: func(release update.Release, asset update.Asset) bool { - return asset.Name == "xbar."+release.TagName+".tar.gz" + // get the .tar.gz file + return strings.HasSuffix(asset.Name, ".tar.gz") }, DownloadBytesLimit: 10_741_824, // 10MB }