diff options
Diffstat (limited to 'findNext.go')
| -rw-r--r-- | findNext.go | 80 |
1 files changed, 10 insertions, 70 deletions
diff --git a/findNext.go b/findNext.go index e56dd9c..ff8c893 100644 --- a/findNext.go +++ b/findNext.go @@ -9,6 +9,7 @@ import ( "go.wit.com/log" + "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/gitpb" ) @@ -102,17 +103,6 @@ func findNext() bool { continue } } - /* - findCounter += 1 - if !check.ParseGoSum() { - log.Info("ParseGoSum() failed", check.GetGoPath()) - log.Info("ParseGoSum() failed", check.GetGoPath()) - log.Info("ParseGoSum() failed", check.GetGoPath()) - continue - } - */ - - // fixGodeps(check) if err := me.forge.FinalGoDepsCheckOk(check, argv.Verbose); err != nil { // if err := me.forge.FinalGoDepsCheckOk(check, false); err != nil { @@ -128,6 +118,15 @@ func findNext() bool { if findCounter == 0 { log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len()) if me.found.Len() == 0 { + printDone() + log.Info("cd lib/; make debian") + wit := me.forge.FindByGoPath("go.wit.com/apps/utils/wit-test") + if wit != nil { + log.Info("cd", wit.GetFullPath()) + os.Chdir(wit.GetFullPath()) + shell.Exec([]string{"ls", "-l"}) + shell.Exec([]string{"echo", "make", "debian-release-force"}) + } okExit("") } } else { @@ -139,65 +138,6 @@ func findNext() bool { return false } -// tries to fix the go.mod and go.sum files -func fixGodepsOLD(check *gitpb.Repo) bool { - var good bool = true - - check.GoDeps = nil - - if result, err := check.RunQuiet([]string{"go-mod-clean", "--strict"}); err != nil { - for _, line := range result.Stdout { - log.Warn("stdout:", line) - } - for _, line := range result.Stderr { - log.Warn("stderr:", line) - } - return false - } - if check.ParseGoSum() { - return true - } else { - log.Info("ParseGoSum() failed but go-mod-clean --strict worked", check.GetGoPath()) - return false - } - // skip primative ones - if check.GetGoPrimitive() { - if check.Exists("go.sum") { - log.Info("fixGoDeps() has go.sum but says it is primitive", check.GetGoPath()) - return false - } - log.Info("fixGoDeps() skipping primitive", check.GetGoPath()) - return true - } - log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen()) - log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen()) - log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen()) - deps := check.GoDeps.SortByGoPath() - for deps.Scan() { - depRepo := deps.Next() - // log.Info("found dep", depRepo.GetGoPath()) - if me.forge.Config.IsReadOnly(depRepo.GetGoPath()) { - log.Info("IsReadOnly = true", depRepo.GetGoPath()) - continue - } else { - // log.Info("IsReadOnly = false", depRepo.GetGoPath()) - } - found := me.forge.FindByGoPath(depRepo.GetGoPath()) - if found == nil { - log.Info("not found:", depRepo.GetGoPath()) - continue - } - log.Printf("%-48s dep ver=%10s repo ver=%10s target ver=%10s\n", found.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion(), found.GetTargetVersion()) - if depRepo.GetVersion() != found.GetMasterVersion() { - log.Printf("%-48s %10s (gitpb depRepo)\n", depRepo.GetGoPath(), depRepo.GetVersion()) - log.Printf("%-48s %10s (gitpb found)\n", found.GetGoPath(), found.GetMasterVersion()) - cmd := []string{"go", "get", depRepo.GetGoPath() + "@latest"} - check.RunVerbose(cmd) - } - } - return good -} - func setCurrentRepo(check *gitpb.Repo, s string, note string) bool { me.current = check if check == nil { |
