diff options
Diffstat (limited to 'releaseWindow.go')
| -rw-r--r-- | releaseWindow.go | 61 |
1 files changed, 55 insertions, 6 deletions
diff --git a/releaseWindow.go b/releaseWindow.go index 34db9ad..dc953ea 100644 --- a/releaseWindow.go +++ b/releaseWindow.go @@ -3,6 +3,7 @@ package main import ( "os" + "sort" "strings" "go.wit.com/gui" @@ -44,8 +45,8 @@ func createReleaseWindow() { return } - versionS := "0.13.18" - reasonS := "toolkit load" + versionS := "0.14.0" + reasonS := "gocui" partS := strings.Split(versionS, ".") release.win = gadgets.NewBasicWindow(me.myGui, "Make a new release") @@ -63,14 +64,54 @@ func createReleaseWindow() { // do an initial scan of all the repos scanGoSum() - release.grid.NewButton("next repo", func() { - buttonDisable() - defer buttonEnable() - log.Info("find the next repo to release here") + release.grid.NewButton("findNextDirty()", func() { + release.win.Disable() if findNextDirty() { log.Info("findNextDirty() found a repo") + release.win.Enable() return } + release.win.Enable() + }) + release.grid.NewButton("nil", func() { + log.Info("just filling the grid") + }) + release.grid.NewButton("next repo", func() { + buttonDisable() + defer buttonEnable() + + // allrepos map[string]*repo + + keys := make([]string, 0, len(me.allrepos)) + for key := range me.allrepos { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, path := range keys { + repo := me.allrepos[path] + // mt.Printf("%s: %s\n", key, myMap[key]) + + //// for _, repo := range me.allrepos { + // goSumS := repo.getGoSumStatus() + // dirtyS := repo.dirtyLabel.String() + + if repo.status.ReadOnly() { + log.Info("skipping repo:", path, repo.String()) + } else { + log.Info("searching on repo:", path, repo.String()) + tmp := repo.status.GetGoDeps() + for path, version := range tmp { + r, ok := me.allrepos[path] + if ok { + log.Info("\tfound path", path, r, version) + } else { + log.Info("\tdid not find path", path, r, version) + } + } + } + } + return if findNextRepo() { log.Info("findNextRepo() found a repo") return @@ -327,6 +368,10 @@ func findNextDirty() bool { if goSumS == "DIRTY 2" { continue } + if goSumS == "BAD DEP" { + // find out what kind of BAD DEP? + continue + } // latestversion := repo.status.GetLastTagVersion() if goSumS == "CLEAN" { // if it's clean here, then check and remake the go.sum file @@ -376,6 +421,10 @@ func findNextRepo() bool { if goSumS == "BAD VERSION" { continue } + if goSumS == "BAD DEP" { + // find out what kind of BAD DEP? + continue + } // latestversion := repo.status.GetLastTagVersion() if goSumS == "CLEAN" { // if it's clean here, then check and remake the go.sum file |
