Skip to content

Commit

Permalink
fix url for windows and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed May 29, 2024
1 parent b48a33b commit f84094a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/update/unstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ const unstableURL = "https://unstable.golift.io"
// CheckUnstable checks if the provided app has an updated version on GitHub.
// Pass in revision only, no version.
func CheckUnstable(ctx context.Context, app string, revision string) (*Update, error) {
uri := fmt.Sprintf("%s/%s/%s.%s.exe.zip", unstableURL, strings.ToLower(app), app, runtime.GOARCH)
if runtime.GOOS == "linux" {
uri = fmt.Sprintf("%s/%s/%s.%s.gz", unstableURL, strings.ToLower(app), app, runtime.GOARCH)
} else if runtime.GOOS == "darwin" {
uri = fmt.Sprintf("%s/%s/%s.dmg", unstableURL, strings.ToLower(app), app)
app = strings.ToLower(app)
uri := fmt.Sprintf("%s/%s/%s.%s.exe.zip", unstableURL, app, app, runtime.GOARCH)

if runtime.GOOS == "darwin" {
uri = fmt.Sprintf("%s/%s/%s.dmg", unstableURL, app, app)
} else if runtime.GOOS != "windows" {
uri = fmt.Sprintf("%s/%s/%s.%s.%s.gz", unstableURL, app, app, runtime.GOARCH, runtime.GOOS)
}

release, err := GetUnstable(ctx, uri)
Expand Down

0 comments on commit f84094a

Please sign in to comment.