detect the end

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-09 12:13:48 -06:00
parent 17e1a099c4
commit 20a21947f3
1 changed files with 13 additions and 4 deletions

View File

@ -28,6 +28,8 @@ func findUnreleased() bool {
return false
}
}
log.Info("nothing left to unwind")
release.status.SetValue("ALL DONE?")
return false
}
@ -61,23 +63,28 @@ func createUnreleaseBox(box *gui.Node) {
if rerelease() {
log.Info("good to re-release another one")
} else {
log.Info("loop(3) failed")
log.Info("re-release failed")
return
}
me.Enable()
})
group.NewButton("loop(10)", func() {
group.NewButton("loop(25)", func() {
me.Disable()
unwindWhitelist()
for n := 0; n <= 10; n++ {
for n := 0; n <= 25; n++ {
if rerelease() {
log.Info("good to re-release another one")
} else {
if release.status.String() == "ALL DONE?" {
log.Info("maybe ALL DONE?")
me.Enable()
return
}
log.Info("loop() failed", n)
return
}
}
log.Info("loop(10) worked")
log.Info("loop(25) worked")
me.Enable()
})
}
@ -143,6 +150,8 @@ func rerelease() bool {
log.Info("EVERYTHING OK. RERELEASED", release.current.String())
if findUnreleased() {
log.Info("GOOD TO RUN ANOTHER DAY ON:", release.current.String())
} else {
return false
}
} else {
log.Info("SOMETHING FAILED")