a few layout cleanups
This commit is contained in:
parent
c6fcf5e5a5
commit
c4be56ddad
|
@ -117,10 +117,10 @@ func checkValidGoSum(repo *repolist.Repo) bool {
|
|||
// try to figure out if there is another package to update
|
||||
func doReleaseFindNext() bool {
|
||||
// scan for new repo
|
||||
if findNextDirty("") {
|
||||
log.Info("findNextDirty() found something")
|
||||
if findNext() {
|
||||
log.Info("findNext() found something")
|
||||
} else {
|
||||
log.Info("findNextDirty() could not find anything")
|
||||
log.Info("findNext() could not find anything")
|
||||
return false
|
||||
}
|
||||
if checkValidGoSum(me.current) {
|
||||
|
|
|
@ -89,11 +89,8 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
group1 = vbox.NewGroup("prep for release")
|
||||
grid := group1.NewGrid("test", 0, 0)
|
||||
|
||||
grid.NewButton("set target version", func() {
|
||||
setTargetVersion()
|
||||
})
|
||||
var longB *gui.Node
|
||||
longB = grid.NewButton("redo all go.sum", func() {
|
||||
longB = grid.NewButton("generate go.sum files", func() {
|
||||
me.Disable()
|
||||
var worked bool = true
|
||||
for _, repo := range me.repos.View.AllRepos() {
|
||||
|
|
2
main.go
2
main.go
|
@ -89,8 +89,6 @@ func main() {
|
|||
me.release.openrepo.Disable()
|
||||
|
||||
me.Disable()
|
||||
log.Info("sleep(1)")
|
||||
log.Sleep(1)
|
||||
|
||||
// parse config file and scan for .git repos
|
||||
me.repos.initRepoList()
|
||||
|
|
|
@ -73,6 +73,14 @@ func createReleaseBox(box *gui.Node) {
|
|||
log.Info("doRelease() failed")
|
||||
}
|
||||
})
|
||||
me.release.grid.NewButton("Find Next Releasable", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
if findNext() {
|
||||
log.Info("findNext() found a repo")
|
||||
return
|
||||
}
|
||||
})
|
||||
me.release.grid.NextRow()
|
||||
|
||||
me.release.repo = gadgets.NewOneLiner(me.release.grid, "repo")
|
||||
|
@ -173,31 +181,9 @@ func createReleaseBox(box *gui.Node) {
|
|||
log.Info("release returned", worked, "and ran for", s)
|
||||
buttonEnable()
|
||||
})
|
||||
|
||||
grid.NewButton("scan for Ready", func() {
|
||||
me.Disable()
|
||||
scanForReady()
|
||||
me.Enable()
|
||||
})
|
||||
grid.NewButton("findNextDirty(PRIMATIVE)", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
if findNextDirty("PRIMATIVE") {
|
||||
log.Info("findNextDirty() found a repo")
|
||||
return
|
||||
}
|
||||
})
|
||||
grid.NewButton("findNextDirty()", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
if findNextDirty("") {
|
||||
log.Info("findNextDirty() found a repo")
|
||||
return
|
||||
}
|
||||
})
|
||||
grid.NextRow()
|
||||
|
||||
group = me.release.box.NewGroup("experimental and dangerous stuff")
|
||||
group = me.release.box.NewGroup("experimental and potentially dangerous stuff")
|
||||
grid = group.NewGrid("buildOptions", 0, 0)
|
||||
grid.NewButton("rm -f go.mod go.sum", func() {
|
||||
me.Disable()
|
||||
|
@ -301,7 +287,7 @@ func scanForReady() bool {
|
|||
for _, repo := range me.repos.View.AllRepos() {
|
||||
goSumS := repo.GoState()
|
||||
dirtyS := repo.State()
|
||||
log.Info("findNextDirty()", repo.GoPath(), goSumS, dirtyS)
|
||||
log.Info("findNext()", repo.GoPath(), goSumS, dirtyS)
|
||||
|
||||
if whitelist(repo.GoPath()) {
|
||||
log.Info("found WHITELIST", repo.GoPath())
|
||||
|
@ -320,7 +306,7 @@ func scanForReady() bool {
|
|||
// trys to figure out if there is still something to update
|
||||
// todo: redo this logic as it is terrible
|
||||
// rename this findNext()
|
||||
func findNextDirty(onlyKind string) bool {
|
||||
func findNext() bool {
|
||||
for _, repo := range me.repos.View.AllRepos() {
|
||||
goSumS := repo.GoState()
|
||||
|
||||
|
@ -334,33 +320,30 @@ func findNextDirty(onlyKind string) bool {
|
|||
continue
|
||||
}
|
||||
if repo.ReadOnly() {
|
||||
// log.Info("findNextDirty() skipping readonly")
|
||||
// log.Info("findNext() skipping readonly")
|
||||
continue
|
||||
}
|
||||
if repo.CheckDirty() {
|
||||
log.Info("findNextDirty() skipping dirty")
|
||||
log.Info("findNext() skipping dirty")
|
||||
continue
|
||||
}
|
||||
log.Info("findNextDirty()", repo.GoPath(), goSumS)
|
||||
// do makeredomod here
|
||||
// if ! repo.Status.Exists("go.sum") {
|
||||
// }
|
||||
if repo.Status.IsPrimitive() {
|
||||
log.Info("findNext()", repo.GoPath(), goSumS)
|
||||
if setCurrentRepo(repo, "PRIMATIVE", "release new version") {
|
||||
return true
|
||||
}
|
||||
continue
|
||||
}
|
||||
log.Info("findNextDirty()", repo.GoPath(), "is not a primative repo")
|
||||
if onlyKind == "PRIMITIVE" {
|
||||
continue
|
||||
}
|
||||
log.Info("findNext()", repo.GoPath(), "is not a primative repo")
|
||||
if checkValidGoSum(repo) {
|
||||
setCurrentRepo(repo, "should be good to release", "pretty sure")
|
||||
return true
|
||||
}
|
||||
}
|
||||
log.Info("tried to findNextDirty() but not sure what to do next")
|
||||
log.Info("tried to findNext() but not sure what to do next")
|
||||
me.release.status.SetText("ALL DONE?")
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue