diff --git a/doRelease.go b/doRelease.go index 91b3449..98fbc28 100644 --- a/doRelease.go +++ b/doRelease.go @@ -103,13 +103,15 @@ func doRelease() bool { pb := me.forge.Repos.FindByGoPath(me.current.GoPath()) if pb != nil { pb.UpdatePublished() - if !pb.GetGoPrimitive() { + /* remove. earlier protected against nil + if !pb.IsPrimitive() { loop := pb.Published.SortByGoPath() for loop.Scan() { t := loop.Next() log.Info("new Published dep:", t.GetGoPath(), t.GetVersion()) } } + */ me.forge.Repos.ConfigSave() } diff --git a/findNext.go b/findNext.go index ce1fd6d..225cd65 100644 --- a/findNext.go +++ b/findNext.go @@ -39,21 +39,50 @@ func findNext() bool { log.Info("findNext() skipping dirty") continue } - log.Info("findNext()", repo.GoPath(), "is not a primative repo") if findFix { log.Info("findFix is true. running fixGoDeps()") - fixGodeps(check) + if fixGodeps(check) { + log.Info("fixGoDeps() returned true") + } else { + log.Info("fixGoDeps() returned false") + } + } findCounter += 1 + if check.Exists("go.mod") { + log.Info("go.mod exists here") + } else { + log.Info("go.mod is gone here") + } if ok, err := check.ParseGoSum(); !ok { log.Info("ParseGoSum() failed (probably repo needs go mod tidy)", err) log.Info("ParseGoSum() findFix =", findFix, "findCounter =", findCounter) + if check.Exists("go.mod") { + log.Info("go.mod exists here") + } else { + log.Info("go.mod is gone here") + } continue } + if check.Exists("go.mod") { + log.Info("go.mod exists here") + } else { + log.Info("go.mod is gone here") + } if me.forge.FinalGoDepsCheckOk(check) { setCurrentRepo(repo, "should be good to release", "pretty sure") + if check.Exists("go.mod") { + log.Info("go.mod exists here") + } else { + log.Info("go.mod is gone here") + } return true } + if check.Exists("go.mod") { + log.Info("go.mod exists here") + } else { + log.Info("go.mod is gone here") + } log.Info("findNext() got to the end. repo", repo.GoPath(), "did not work. trying to find a new one now") } if findCounter == 0 { @@ -72,7 +101,7 @@ func fixGodeps(check *gitpb.Repo) bool { var good bool = true // check if the package dependancies changed, if so, re-publish // skip primative ones - if check.GetGoPrimitive() { + if ok, _ := check.IsPrimitive(); ok { log.Info("fixGoDeps() skipping primitive", check.GoPath) return true } diff --git a/prepareRelease.go b/prepareRelease.go index bd8d433..952d41a 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -124,5 +124,16 @@ func makePrepareRelease() { } } } - findNext() + if findNext() { + log.Info("prepare release findNext() returned true") + me.release.box.Enable() + } else { + log.Info("prepare release findNext() returned false") + if findNext() { + log.Info("prepare release findNext() returned true") + me.release.box.Enable() + } else { + log.Info("prepare release findNext() returned false") + } + } } diff --git a/releaseBox.go b/releaseBox.go index d366f63..8981a53 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -233,8 +233,10 @@ func createReleaseBox(box *gui.Node) { func buttonDisable() { me.Disable() + me.release.box.Disable() } func buttonEnable() { me.Enable() + me.release.box.Enable() }