From a684ce42080aec90a423a2c3e0805bffcc3cc2a9 Mon Sep 17 00:00:00 2001 From: moqsien Date: Tue, 5 Mar 2024 10:32:18 +0800 Subject: [PATCH] update filters --- pkgs/versions/github.go | 8 ++++---- pkgs/versions/nodejs.go | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/versions/github.go b/pkgs/versions/github.go index 9642fe3..4a70496 100644 --- a/pkgs/versions/github.go +++ b/pkgs/versions/github.go @@ -76,10 +76,10 @@ func filterByUrl(dUrl string) bool { ".txt", ".d.ts", "src.tar.gz", - "-baseline.zip", // for bun - "-profile.zip", // for bun - "denort-", // for deno - "-unknown-linux-musl.tar.gz", // for fd. + "-baseline.zip", // for bun + "-profile.zip", // for bun + "denort-", // for deno + // "-unknown-linux-musl.tar.gz", // for fd. "-pc-windows-gnu.zip", // for fd. "linux-gnueabihf", // for fd "linux-musleabihf", // for fd diff --git a/pkgs/versions/nodejs.go b/pkgs/versions/nodejs.go index eaeab30..00818d3 100644 --- a/pkgs/versions/nodejs.go +++ b/pkgs/versions/nodejs.go @@ -79,14 +79,13 @@ func (n *Nodejs) getVersion(vItem *Item) { // os.WriteFile("test.txt", []byte(content), os.ModePerm) for _, line := range strings.Split(content, "\n") { + if strings.Contains(line, "/node_pdb.zip") { + continue + } if strings.Contains(line, ".tar.gz") || strings.Contains(line, ".zip") { uList := strings.Split(strings.TrimSpace(line), " ") if len(uList) >= 2 { fName := strings.TrimSpace(uList[len(uList)-1]) - // filter - if strings.Contains(fName, "node_pdb.zip") { - continue - } archStr := utils.ParseArch(fName) osStr := utils.ParsePlatform(fName) if archStr != "" && osStr != "" {