diff options
| author | Jeff Carr <[email protected]> | 2024-02-20 20:42:54 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-20 20:42:54 -0600 |
| commit | c4be56ddad94e6361ddc2a15a61a4fb4dd17758a (patch) | |
| tree | e529efa0a8ba18a6bad98b2c52184b01c1787b41 /releaseBox.go | |
| parent | c6fcf5e5a5c4373b95b0da669c8d1c155ae45740 (diff) | |
a few layout cleanups
Diffstat (limited to 'releaseBox.go')
| -rw-r--r-- | releaseBox.go | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/releaseBox.go b/releaseBox.go index 07e67ad..b3955e8 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -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 } |
