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.
This commit is contained in:
AJ ONeal
2026-03-09 22:33:15 -06:00
parent caae40df27
commit c4a358e5a5
2 changed files with 9 additions and 0 deletions

5
_example/releases.conf Normal file
View File

@@ -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

View File

@@ -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)