fix for new gitpb

This commit is contained in:
Jeff Carr 2024-12-17 13:13:15 -06:00
parent 3d22172fa9
commit db2296b5b4
5 changed files with 5 additions and 33 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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()

View File

@ -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
}

View File

@ -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()