From 9292d023b97783fc06ca5f21d67a03338ee10913 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Oct 2025 20:03:05 -0500 Subject: only build changed stuff --- doBuild.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doBuild.go b/doBuild.go index 3663a9e..c12b2b6 100644 --- a/doBuild.go +++ b/doBuild.go @@ -42,7 +42,7 @@ func doBuild() (string, error) { } tobuild := gitpb.NewRepos() var simpletable [][]string - simpletable = append(simpletable, []string{"debname", "version", " age", "smartver", "curb", "curver", "newb", "arch", "FullPath"}) + simpletable = append(simpletable, []string{"debname", "version", " age", "smartver", "curb", "curver", "newb", "build", "arch", "FullPath"}) for i, line := range strings.Split(string(data), "\n") { var path string var debname string @@ -98,15 +98,24 @@ func doBuild() (string, error) { } cmd := makeGoDebCmd(repo, newcount, "") cmdstr := fmt.Sprintf("%v", cmd) - simpletable = append(simpletable, []string{debname, p.Version, age, smartver, bcount, curver, newcount, arches, cmdstr}) + build := "no" + if (smartver != curver) || repo.CheckDirty() { + build = "yes" + repo.DirtyList = cmd + tobuild.Clone(repo) + } + + simpletable = append(simpletable, []string{debname, p.Version, age, smartver, bcount, curver, newcount, build, arches, cmdstr}) - repo.DirtyList = cmd - tobuild.Clone(repo) } footer := cobol.SimpleTable(simpletable) log.Info("simple build table footer:", footer) + if argv.DryRun { + return "dryrun", nil + } + // for r := range tobuild.IterAll() { // log.Info(r.FullPath, r.DirtyList) // } -- cgit v1.2.3