From ca426d5fd275362e4f74be89deeac42c7adbd366 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 18 Jan 2023 13:18:23 -0600 Subject: [PATCH] fix: don't select installers Signed-off-by: jolheiser --- forge/forge.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/forge/forge.go b/forge/forge.go index 7f109f0..eb90908 100644 --- a/forge/forge.go +++ b/forge/forge.go @@ -10,9 +10,10 @@ import ( ) var ( - amd64Re = regexp.MustCompile(`amd64|x86_64|64-bit|[^mhv]64`) - linuxRe = regexp.MustCompile(`linux`) - windowsRe = regexp.MustCompile(`windows|\Awin`) + amd64Re = regexp.MustCompile(`amd64|x86_64|64-bit|[^mhv]64`) + linuxRe = regexp.MustCompile(`linux`) + windowsRe = regexp.MustCompile(`windows|\Awin`) + installerRe = regexp.MustCompile(`\.deb|\.msi`) ) type Release struct { @@ -99,7 +100,7 @@ func LatestRelease(f Forger) (Asset, error) { } 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) asset = a break