summaryrefslogtreecommitdiff
path: root/doDebian.go
diff options
context:
space:
mode:
Diffstat (limited to 'doDebian.go')
-rw-r--r--doDebian.go43
1 files changed, 19 insertions, 24 deletions
diff --git a/doDebian.go b/doDebian.go
index acd2eae..333b99f 100644
--- a/doDebian.go
+++ b/doDebian.go
@@ -4,6 +4,8 @@
package main
import (
+ "fmt"
+ "os"
"path/filepath"
"go.wit.com/lib/gui/shell"
@@ -29,7 +31,7 @@ func doDebian() {
found := gitpb.NewRepos()
for check := range me.forge.Repos.IterAll() {
- if me.forge.Config.IsReadOnly(check.GetGoPath()) {
+ if me.forge.Config.IsReadOnly(check.GetNamespace()) {
continue
}
@@ -61,6 +63,7 @@ func doDebian() {
}
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 {
log.Info(s, stat.Err)
@@ -78,45 +81,37 @@ func buildDeb(check *gitpb.Repo) error {
outdir := getOutdir(check)
os.MkdirAll(outdir, 0755)
- if me.forge.Config.IsReadOnly(check.GetGoPath()) {
- return nil
- }
-
- if !check.IsBinary() {
- return nil
- }
-
- if check.IsGoPlugin() {
- return nil
- }
-
- if argv.Release {
+ if argv.Build.Debian.Release {
cmd = []string{"go-deb", "--release", "--dir", outdir}
} else {
cmd = []string{"go-deb", "--dir", outdir}
}
- if me.forge.Config.IsPrivate(check.GetGoPath()) {
+ if me.forge.Config.IsPrivate(check.GetNamespace()) {
cmd = []string{"go-deb", "--dir", outdir}
return nil
}
- if argv.Verbose || argv.Force {
- // log.Info("build cmd:", cmd)
- cmd = append(cmd, "--verbose")
- }
- if argv.DryRun {
- return nil
- }
+ // computes the state hash todo: move this logic into the protobuf
+ doInstallScan()
if argv.Force {
// build everything no matter what
} else {
- if state[check] != "need to build" {
+ if check.GetState() != "need to build" {
// log.Info("skipping build for", check.GetGoPath(), state[check])
return nil
}
}
+ if argv.Verbose || argv.Force {
+ // log.Info("build cmd:", cmd)
+ cmd = append(cmd, "--verbose")
+ }
+ if argv.DryRun {
+ return nil
+ }
+
+ log.Info("Building .deb", cmd)
var err error
if _, err = check.RunVerboseOnError(cmd); err != nil {
log.Info(check.FullPath, cmd)
@@ -129,7 +124,7 @@ func buildDeb(check *gitpb.Repo) error {
}
func getOutdir(repo *gitpb.Repo) string {
- if me.forge.Config.IsPrivate(repo.GetGoPath()) {
+ if me.forge.Config.IsPrivate(repo.GetNamespace()) {
return "/home/jcarr/incoming-private"
}
if argv.Force {