diff options
| author | Jeff Carr <[email protected]> | 2025-10-26 15:56:51 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-26 15:56:51 -0500 |
| commit | 5e89b5f08dc80fbe288227997f3ed8c789d1f17d (patch) | |
| tree | e3bdc88cfa546e7c930c89317e08e470d16d9e83 | |
| parent | 44b327450b27ebb93b47b4366c2d5b9bffdef59f (diff) | |
maybe rill will work here again
| -rw-r--r-- | doBuild.debian.go | 23 | ||||
| -rw-r--r-- | doBuild.go | 29 |
2 files changed, 26 insertions, 26 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 @@ -10,7 +10,6 @@ import ( "strings" "go.wit.com/lib/cobol" - "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -97,38 +96,24 @@ func doBuild() (string, error) { } else { age = cobol.Duration(t) } - tobuild.Clone(repo) cmd := makeGoDebCmd(repo, newcount, "") cmdstr := fmt.Sprintf("%v", cmd) simpletable = append(simpletable, []string{debname, p.Version, age, smartver, bcount, curver, newcount, arches, cmdstr}) - if !argv.DryRun { - err := repo.RunVerbose(cmd) - if err != nil { - argvpb.BadExit("go-deb failed", err) - } - } - // argvpb.GoodExit("built 1") + + newr := tobuild.Clone(repo) + newr.DirtyList = cmd } footer := cobol.SimpleTable(simpletable) log.Info("simple build table footer:", footer) if !argv.DryRun { - shell.RunVerbose([]string{"do-aptly"}) + return doBuildDeb(tobuild) + } + for r := range tobuild.IterAll() { + log.Info(r.FullPath, r.DirtyList) } - - argv.DryRun = true - // for r := range tobuild.IterAll() { - // } - /* - if err := doInstall(found); err != nil { - // log.Info("doInstall() failed", err) - argvpb.BadExit("doInstall() failed", err) - } - return doBuildDeb(found) - */ } - return "todo: doBuild()", nil } |
