summaryrefslogtreecommitdiff
path: root/findNext.go
diff options
context:
space:
mode:
Diffstat (limited to 'findNext.go')
-rw-r--r--findNext.go28
1 files changed, 10 insertions, 18 deletions
diff --git a/findNext.go b/findNext.go
index c3ca8b5..1e04bc9 100644
--- a/findNext.go
+++ b/findNext.go
@@ -6,7 +6,6 @@ import (
"go.wit.com/log"
- "go.wit.com/lib/gui/repolist"
"go.wit.com/lib/protobuf/gitpb"
)
@@ -19,14 +18,13 @@ var findOk bool = true
// rename this findNext()
func findNext() bool {
findCounter = 0
- loop := me.repos.View.ReposSortByName()
- for loop.Scan() {
- repo := loop.Repo()
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ check := all.Next()
- check := me.forge.FindByGoPath(repo.GetGoPath())
- if check == nil {
- log.Info("boo, you didn't git clone", repo.GetGoPath())
- return false
+ if check.GetTargetVersion() == "" {
+ // not set to upgrade
+ continue
}
if check.GetLastTag() == check.GetTargetVersion() {
// log.Info("findNext() no update needed", check.GetGoPath, check.GetTargetVersion(), "vs", check.GetCurrentBranchVersion())
@@ -73,7 +71,7 @@ func findNext() bool {
log.Info("go.mod is gone here")
}
if me.forge.FinalGoDepsCheckOk(check) {
- setCurrentRepo(repo, "should be good to release", "pretty sure")
+ setCurrentRepo(check, "should be good to release", "pretty sure")
if check.Exists("go.mod") {
log.Info("go.mod exists here")
} else {
@@ -86,7 +84,7 @@ func findNext() bool {
} else {
log.Info("go.mod is gone here")
}
- log.Info("findNext() got to the end. repo", repo.GetGoPath(), "did not work. trying to find a new one now")
+ log.Info("findNext() got to the end. repo", check.GetGoPath(), "did not work. trying to find a new one now")
}
if findCounter == 0 {
log.Info("NOTHING TO UPDATE. findCounter =", findCounter)
@@ -166,17 +164,11 @@ func fixGodeps(check *gitpb.Repo) bool {
return good
}
-func setCurrentRepo(repo *repolist.RepoRow, s string, note string) bool {
- check := me.forge.FindByGoPath(repo.GetGoPath())
- if check == nil {
- log.Info("boo, you didn't git clone", repo.GetGoPath())
- return false
- }
-
+func setCurrentRepo(check *gitpb.Repo, s string, note string) bool {
me.release.repo.SetText(check.GetGoPath())
me.release.status.SetText(s)
me.release.notes.SetText(note)
- me.current = repo
+ me.current = check
me.release.version.SetText(check.GetTargetVersion())
me.release.releaseVersionB.SetText("release version " + check.GetTargetVersion())
me.release.openrepo.Enable()