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