summaryrefslogtreecommitdiff
path: root/doDebian.go
diff options
context:
space:
mode:
Diffstat (limited to 'doDebian.go')
-rw-r--r--doDebian.go36
1 files changed, 16 insertions, 20 deletions
diff --git a/doDebian.go b/doDebian.go
index 333b99f..0a2617a 100644
--- a/doDebian.go
+++ b/doDebian.go
@@ -4,7 +4,6 @@
package main
import (
- "fmt"
"os"
"path/filepath"
@@ -28,6 +27,7 @@ func doDebian() {
}
initForge()
+ doInstallScan()
found := gitpb.NewRepos()
for check := range me.forge.Repos.IterAll() {
@@ -46,31 +46,31 @@ func doDebian() {
}
me.forge.PrintForgedTable(found)
- if argv.DryRun {
- doInstallScan()
- okExit("")
- }
-
- me.forge.ConfigRill(16, 16)
- stats := me.forge.RunOnRepos(found, doInstallRepo)
- for s, stat := range stats {
- if stat.Err == nil {
- continue
+ if !argv.DryRun {
+ me.forge.ConfigRill(16, 16)
+ stats := me.forge.RunOnRepos(found, doInstallRepo)
+ for s, stat := range stats {
+ if stat.Err == nil {
+ continue
+ }
+ dur := stat.End.Sub(stat.Start)
+ log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err)
+ badExit(stat.Err)
}
- dur := stat.End.Sub(stat.Start)
- log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err)
- badExit(stat.Err)
}
me.forge.ConfigRill(16, 16)
log.Info("STARTING .deb BUILDS repo len =", found.Len())
- stats = me.forge.RunOnRepos(found, buildDeb)
+ stats := me.forge.RunOnRepos(found, buildDeb)
for s, stat := range stats {
- log.Info(s, stat.Err)
if stat.Err != nil {
+ log.Info("ERROR WITH buildDeb", s, stat.Err)
badExit(stat.Err)
}
}
+ if argv.DryRun {
+ return
+ }
exitOnErrorRealtime([]string{"do-aptly"})
}
@@ -91,9 +91,6 @@ func buildDeb(check *gitpb.Repo) error {
return nil
}
- // computes the state hash todo: move this logic into the protobuf
- doInstallScan()
-
if argv.Force {
// build everything no matter what
} else {
@@ -115,7 +112,6 @@ func buildDeb(check *gitpb.Repo) error {
var err error
if _, err = check.RunVerboseOnError(cmd); err != nil {
log.Info(check.FullPath, cmd)
- failed[check] = fmt.Sprint("godeb failed", cmd, "with", err)
return err
}