summaryrefslogtreecommitdiff
path: root/doDebian.go
diff options
context:
space:
mode:
Diffstat (limited to 'doDebian.go')
-rw-r--r--doDebian.go44
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
+}