mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-06 18:36:50 +00:00
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:
5
_example/releases.conf
Normal file
5
_example/releases.conf
Normal 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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user