diff --git a/cmd/rules.go b/cmd/rules.go index 483699f..368b859 100644 --- a/cmd/rules.go +++ b/cmd/rules.go @@ -1,16 +1,17 @@ package main import ( - "github.com/konveyor/tackle2-addon/command" - "github.com/konveyor/tackle2-addon/repository" - "github.com/konveyor/tackle2-hub/api" - "github.com/konveyor/tackle2-hub/nas" - "github.com/rogpeppe/go-internal/semver" "os" "path" "regexp" "strconv" "strings" + + "github.com/konveyor/tackle2-addon/command" + "github.com/konveyor/tackle2-addon/repository" + "github.com/konveyor/tackle2-hub/api" + "github.com/konveyor/tackle2-hub/nas" + "github.com/rogpeppe/go-internal/semver" ) type History = map[uint]byte @@ -70,12 +71,23 @@ func (r *Rules) addFiles() (err error) { if err != nil { return } - r.rules = append(r.rules, ruleDir) + addon.Activity( + "[RULESET] fetching: %s", + r.Path) bucket := addon.Bucket() err = bucket.Get(r.Path, ruleDir) if err != nil { return } + entries, err := os.ReadDir(ruleDir) + if err != nil { + return + } + for _, ent := range entries { + r.rules = append( + r.rules, + path.Join(ruleDir, ent.Name())) + } return }