diff options
Diffstat (limited to 'doBuild.debian.go')
| -rw-r--r-- | doBuild.debian.go | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/doBuild.debian.go b/doBuild.debian.go index 7317e27..0c0013b 100644 --- a/doBuild.debian.go +++ b/doBuild.debian.go @@ -5,13 +5,10 @@ package main import ( "errors" - "fmt" - "os" "path/filepath" "strconv" "strings" - "go.wit.com/lib/cobol" "go.wit.com/lib/debian" "go.wit.com/lib/env" "go.wit.com/lib/fhelp" @@ -21,6 +18,7 @@ import ( "go.wit.com/log" ) +/* // find packages that need to be built func findBuildDeb() *gitpb.Repos { initForge() @@ -93,6 +91,7 @@ func findBuildDeb() *gitpb.Repos { found.ActualSort() return found } +*/ var totalBuilt int @@ -111,7 +110,7 @@ func doBuildDeb(all *gitpb.Repos) (string, error) { log.Info("This is what will and will not be built:", footer) me.forge.ConfigRill(16, 16) - stats := me.forge.RunOnRepos(all, buildDeb) + stats := me.forge.RunOnRepos(all, runFromDL) for s, stat := range stats { if stat.Err != nil { return "ERROR WITH buildDeb " + s, stat.Err @@ -136,6 +135,20 @@ func doBuildDeb(all *gitpb.Repos) (string, error) { return "all .deb built ok", nil } +func runFromDL(repo *gitpb.Repo) error { + var err error + cmd := repo.DirtyList + log.Info("Building", cmd) + if _, err = repo.RunVerboseOnError(cmd); err != nil { + log.Info(repo.FullPath, cmd) + return err + } + + totalBuilt += 1 + log.Info("build worked", cmd, repo.FullPath) + return nil +} + // avoids nil panics func isDebianRelease() bool { if argv.Build == nil { @@ -223,6 +236,7 @@ func getOutdir(repo *gitpb.Repo) string { return "/home/jcarr/incoming" } +/* func buildDeb(repo *gitpb.Repo) error { var cmd []string @@ -288,6 +302,7 @@ func buildDeb(repo *gitpb.Repo) error { log.Info("build worked", cmd, repo.FullPath) return nil } +*/ func makeGoDebCmd(repo *gitpb.Repo, bvers string, arch string) []string { var cmd []string |
