Skip to content

Commit

Permalink
fixed update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 8, 2021
1 parent 7f2e044 commit ff4be34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"path/filepath"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit ff4be34

Please sign in to comment.