mirror of
https://github.com/MedzikUser/go-github-selfupdate.git
synced 2024-08-15 03:25:29 +00:00
allow releases which are not archived
This commit is contained in:
parent
0840390e9e
commit
6fe53791b2
1 changed files with 3 additions and 3 deletions
|
@ -25,11 +25,11 @@ func findSuitableReleaseAndAsset(rels []*github.RepositoryRelease) (*github.Repo
|
|||
// Generate candidates
|
||||
cs := make([]string, 0, 8)
|
||||
for _, sep := range []rune{'_', '-'} {
|
||||
for _, ext := range []string{"zip", "tar.gz"} {
|
||||
suffix := fmt.Sprintf("%s%c%s.%s", runtime.GOOS, sep, runtime.GOARCH, ext)
|
||||
for _, ext := range []string{".zip", ".tar.gz", ""} {
|
||||
suffix := fmt.Sprintf("%s%c%s%s", runtime.GOOS, sep, runtime.GOARCH, ext)
|
||||
cs = append(cs, suffix)
|
||||
if runtime.GOOS == "windows" {
|
||||
suffix = fmt.Sprintf("%s%c%s.exe.%s", runtime.GOOS, sep, runtime.GOARCH, ext)
|
||||
suffix = fmt.Sprintf("%s%c%s.exe%s", runtime.GOOS, sep, runtime.GOARCH, ext)
|
||||
cs = append(cs, suffix)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue