Skip to content

Commit

Permalink
feat: use latest release url for version checker #23
Browse files Browse the repository at this point in the history
  • Loading branch information
leukipp committed Jan 12, 2024
1 parent d269417 commit 29b14a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type BuildInfo struct {
Version string // Build version
Commit string // Build commit
Date string // Build date
Source string // Build summary
Source string // Build source
Latest string // Build latest
Summary string // Build summary
}
Expand Down Expand Up @@ -83,7 +83,7 @@ func InitArgs(name, version, commit, date, source string) {
func Latest(source string) string {

// Request latest version from github
res, err := http.Get(strings.Trim(source, "/") + "/releases/latest")
res, err := http.Get(source + "/releases/latest")
if err != nil {
return Build.Version
}
Expand Down
2 changes: 1 addition & 1 deletion input/traybinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func items(tr *desktop.Tracker) {
go func() {
for {
<-version.ClickedCh
exec.Command("xdg-open", common.Build.Source).Start()
exec.Command("xdg-open", common.Build.Source+"/releases/tag/v"+common.Build.Latest).Start()
}
}()
} else {
Expand Down

0 comments on commit 29b14a3

Please sign in to comment.