From db2296b5b4aa6970deabebb3a8cc867c43dc8898 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 17 Dec 2024 13:13:15 -0600 Subject: [PATCH] fix for new gitpb --- doRelease.go | 2 +- findNext.go | 2 +- http.go | 2 +- human.go | 29 ----------------------------- prepareRelease.go | 3 ++- 5 files changed, 5 insertions(+), 33 deletions(-) diff --git a/doRelease.go b/doRelease.go index 11a8285..fd2aa0e 100644 --- a/doRelease.go +++ b/doRelease.go @@ -204,7 +204,7 @@ func doRelease() bool { if !doReleaseFindNext() { log.Info("doReleaseFindNext() could not find a new", findCounter) log.Info("THIS PROBABLY MEANS THAT ACTUALLY WE ARE TOTALLY DONE?", findCounter) - count := PrintReleaseReport("", "") + count := me.forge.PrintReleaseReport() log.Info("count =", count) os.Setenv("FindNextDone", "true") return false diff --git a/findNext.go b/findNext.go index 34552f4..c3ca8b5 100644 --- a/findNext.go +++ b/findNext.go @@ -28,7 +28,7 @@ func findNext() bool { log.Info("boo, you didn't git clone", repo.GetGoPath()) return false } - if check.GetTargetVersion() == check.GetCurrentBranchVersion() { + if check.GetLastTag() == check.GetTargetVersion() { // log.Info("findNext() no update needed", check.GetGoPath, check.GetTargetVersion(), "vs", check.GetCurrentBranchVersion()) continue } else { diff --git a/http.go b/http.go index 8ab92b0..77023a0 100644 --- a/http.go +++ b/http.go @@ -177,7 +177,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { PrintReport(readonly, onlydirty, perfect) return case "/releaseList": - PrintReleaseReport(readonly, perfect) + me.forge.PrintReleaseReport() return case "/goweblist": loop := me.repos.View.ReposAll() diff --git a/human.go b/human.go index 1621154..a615c0f 100644 --- a/human.go +++ b/human.go @@ -54,32 +54,3 @@ func PrintReport(readonly string, onlydirty string, perfect string) { } log.Info(fmt.Sprintf("EVERYTHING WORKED repo count = %d", count)) } - -func PrintReleaseReport(readonly string, perfect string) int { - var count int - - log.Info(repolist.ReleaseReportHeader()) - - loop := me.forge.Repos.SortByFullPath() - for loop.Scan() { - check := loop.Next() - if me.forge.Config.IsReadOnly(check.GetGoPath()) { - continue - } - if check.GetCurrentBranchVersion() == check.GetTargetVersion() { - continue - } - count += 1 - if check == nil { - log.Info("boo, you didn't git clone", check.GetGoPath()) - continue - } - var state string - if check.CheckDirty() { - state = "(dirty)" - } - log.Info(me.forge.StandardReleaseHeader(check, state)) - } - log.Info(fmt.Sprintf("total repo count = %d", count)) - return count -} diff --git a/prepareRelease.go b/prepareRelease.go index d3cf173..e12a67c 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -14,7 +14,7 @@ func makePrepareRelease() { // if it succeeds, disable this button me.setBranchesToMasterB.Disable() me.release.box.Enable() - PrintReleaseReport("", "") + me.forge.PrintReleaseReport() } else { log.Info("setAllBranchesToMaster() failed") } @@ -65,6 +65,7 @@ func makePrepareRelease() { } } + me.forge.ConfigSave() if findNext() { log.Info("prepare release findNext() returned true") me.release.box.Enable()