fix: don't select installers
Signed-off-by: jolheiser <john.olheiser@gmail.com>main v0.0.2
parent
1528f971fa
commit
ca426d5fd2
|
@ -10,9 +10,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
amd64Re = regexp.MustCompile(`amd64|x86_64|64-bit|[^mhv]64`)
|
amd64Re = regexp.MustCompile(`amd64|x86_64|64-bit|[^mhv]64`)
|
||||||
linuxRe = regexp.MustCompile(`linux`)
|
linuxRe = regexp.MustCompile(`linux`)
|
||||||
windowsRe = regexp.MustCompile(`windows|\Awin`)
|
windowsRe = regexp.MustCompile(`windows|\Awin`)
|
||||||
|
installerRe = regexp.MustCompile(`\.deb|\.msi`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type Release struct {
|
type Release struct {
|
||||||
|
@ -99,7 +100,7 @@ func LatestRelease(f Forger) (Asset, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, a := range release.Assets {
|
for _, a := range release.Assets {
|
||||||
if amd64Re.MatchString(a.Name) && re.MatchString(a.Name) {
|
if amd64Re.MatchString(a.Name) && re.MatchString(a.Name) && !installerRe.MatchString(a.Name) {
|
||||||
fmt.Printf("found %q\n", a.Name)
|
fmt.Printf("found %q\n", a.Name)
|
||||||
asset = a
|
asset = a
|
||||||
break
|
break
|
||||||
|
|
Reference in New Issue