parent
b8b65a9c0e
commit
dc2b16840e
|
@ -2,6 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
|
@ -28,7 +29,7 @@ type releaseStruct struct {
|
|||
// widgetVersionS string
|
||||
releaseVersionB *gui.Node
|
||||
// unreleaseB *gui.Node
|
||||
reason *gadgets.BasicEntry
|
||||
reason *gadgets.BasicEntry
|
||||
// reasonS string
|
||||
|
||||
openrepo *gui.Node
|
||||
|
@ -193,22 +194,29 @@ func createReleaseBox(box *gui.Node) {
|
|||
})
|
||||
|
||||
release.grid.NewButton("release all", func() {
|
||||
var worked bool = true
|
||||
buttonDisable()
|
||||
// rather than loop forever, at least limit this to the number of repos
|
||||
// incase something, somewhere, goes wrong
|
||||
for n := 0; n <= len(me.allrepos); n++ {
|
||||
if doRelease() {
|
||||
log.Info("doRelease() worked")
|
||||
} else {
|
||||
if release.status.String() == "ALL DONE?" {
|
||||
log.Info("maybe ALL DONE?")
|
||||
buttonEnable()
|
||||
return
|
||||
duration := timeFunction(func() {
|
||||
for n := 0; n <= len(me.allrepos); n++ {
|
||||
if doRelease() {
|
||||
log.Info("doRelease() worked")
|
||||
} else {
|
||||
if release.status.String() == "ALL DONE?" {
|
||||
log.Info("maybe ALL DONE?")
|
||||
buttonEnable()
|
||||
worked = true
|
||||
break
|
||||
}
|
||||
log.Info("doRelease() failed")
|
||||
worked = false
|
||||
break
|
||||
}
|
||||
log.Info("doRelease() failed")
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
s := fmt.Sprint(duration)
|
||||
log.Info("release returned", worked, "and ran for", s)
|
||||
buttonEnable()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue