From c4a358e5a56b38ae79b83e447a8554eb10722532 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 9 Mar 2026 22:33:15 -0600 Subject: [PATCH] add example releases.conf and skip _-prefixed dirs in fetchraw The discover() function now skips directories starting with _ (like _example, _webi, _common) so infrastructure dirs aren't treated as packages to fetch. --- _example/releases.conf | 5 +++++ cmd/fetchraw/main.go | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 _example/releases.conf diff --git a/_example/releases.conf b/_example/releases.conf new file mode 100644 index 0000000..ac9ffbe --- /dev/null +++ b/_example/releases.conf @@ -0,0 +1,5 @@ +# Example releases.conf — uses ripgrep as a sample project. +# Copy this file into your package directory and adjust. +source = github +owner = BurntSushi +repo = ripgrep diff --git a/cmd/fetchraw/main.go b/cmd/fetchraw/main.go index 95a9f68..960bc6f 100644 --- a/cmd/fetchraw/main.go +++ b/cmd/fetchraw/main.go @@ -105,6 +105,10 @@ func discover(dir string) ([]pkgConf, error) { var packages []pkgConf for _, path := range matches { name := filepath.Base(filepath.Dir(path)) + // Skip infrastructure dirs (_example, _webi, _common, etc.) + if strings.HasPrefix(name, "_") { + continue + } conf, err := installerconf.Read(path) if err != nil { log.Printf("warning: %s: %v", path, err)