diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 17:44:27 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 17:44:27 -0500 |
| commit | 88cf5058f1162249b9d95b6c36628b20960550ba (patch) | |
| tree | 51a86e19d1e93660b9239fe0728194f6587a5a05 /doDebian.go | |
| parent | fa6eff0ac4db3dddc13875f6dcc86a821e75567b (diff) | |
another attemptv0.1.7
Diffstat (limited to 'doDebian.go')
| -rw-r--r-- | doDebian.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/doDebian.go b/doDebian.go index 339fe7d..34861f0 100644 --- a/doDebian.go +++ b/doDebian.go @@ -210,3 +210,47 @@ func getOutdir(repo *gitpb.Repo) string { return "/home/jcarr/incoming" } + +func doOnlyDebianPackages() error { + // clean out old deb files + globPattern := filepath.Join(me.homedir, "incoming", "*.deb") + files, err := filepath.Glob(globPattern) + if err != nil { + log.Info("Error during globbing:", err) + return err + } + if len(files) > 0 { + cmd := []string{"rm"} + cmd = append(cmd, files...) + _, err := shell.RunRealtimeError(cmd) + return err + } + + initForge() + + found := gitpb.NewRepos() + for check := range me.forge.Repos.IterAll() { + if me.forge.Config.IsReadOnly(check.GetNamespace()) { + continue + } + + if !check.IsBinary() { + continue + } + + found.Append(check) + } + + printRepos(found) + + me.forge.ConfigRill(16, 16) + log.Info("STARTING .deb BUILDS repo len =", found.Len()) + stats := me.forge.RunOnRepos(found, buildDeb) + for s, stat := range stats { + if stat.Err != nil { + log.Info("ERROR WITH buildDeb", s, stat.Err) + return stat.Err + } + } + return nil +} |
