parent
8034921c7d
commit
8f44a292c8
19
go.mod
19
go.mod
|
@ -1,19 +0,0 @@
|
|||
module go.wit.com/apps/autotypist
|
||||
|
||||
go 1.21.4
|
||||
|
||||
require (
|
||||
go.wit.com/gui v0.13.18
|
||||
go.wit.com/lib/debugger v0.13.18
|
||||
go.wit.com/lib/gadgets v0.13.18
|
||||
go.wit.com/lib/gui/logsettings v0.13.18
|
||||
go.wit.com/lib/gui/repostatus v0.13.18
|
||||
go.wit.com/log v0.13.18
|
||||
)
|
||||
|
||||
require (
|
||||
go.wit.com/dev/alexflint/arg v1.4.5 // indirect
|
||||
go.wit.com/dev/alexflint/scalar v1.2.1 // indirect
|
||||
go.wit.com/dev/davecgh/spew v1.1.4 // indirect
|
||||
go.wit.com/widget v1.1.9 // indirect
|
||||
)
|
20
go.sum
20
go.sum
|
@ -1,20 +0,0 @@
|
|||
go.wit.com/dev/alexflint/arg v1.4.5 h1:asDx5f9IlfpknKjPBqqb2qndE91Pbo7ZDkWUgddfMhY=
|
||||
go.wit.com/dev/alexflint/arg v1.4.5/go.mod h1:wnWc+c6z8kSdDKYriMf6RpM+FiXmo5RYp/t4FNi0MU0=
|
||||
go.wit.com/dev/alexflint/scalar v1.2.1 h1:loXOcbVnd+8YeJRLey+XXidecBiedMDO00zQ26TvKNs=
|
||||
go.wit.com/dev/alexflint/scalar v1.2.1/go.mod h1:+rYsfxqdI2cwA8kJ7GCMwWbNJvfvWUurOCXLiwdTtSs=
|
||||
go.wit.com/dev/davecgh/spew v1.1.4 h1:C9hj/rjlUpdK+E6aroyLjCbS5MFcyNUOuP1ICLWdNek=
|
||||
go.wit.com/dev/davecgh/spew v1.1.4/go.mod h1:sihvWmnQ/09FWplnEmozt90CCVqBtGuPXM811tgfhFA=
|
||||
go.wit.com/gui v0.13.18 h1:r4z1FNg6AxGWfq13+na4Xu/uA8PTTtDGka0ajo29omk=
|
||||
go.wit.com/gui v0.13.18/go.mod h1:SRcfZKSbBWUxyyDiqlISWEYySoeATnijVxhzRIF0xiE=
|
||||
go.wit.com/lib/debugger v0.13.18 h1:uPVehvDSNnvY5tDyIt2kbHtjFsV5Lz9witNCpTxgUc8=
|
||||
go.wit.com/lib/debugger v0.13.18/go.mod h1:3DXsRIR7egiuBB9iP2o8k0nNuPOHE/AHjj7sWu40lSI=
|
||||
go.wit.com/lib/gadgets v0.13.18 h1:Z35WCI6BtRamRkLTWaUP5/9+BnOGGbRdnD95SnnM6Tw=
|
||||
go.wit.com/lib/gadgets v0.13.18/go.mod h1:hU0cXWfyvBrxmKD37MLyjOfJRK4+cU1aJ6lLx1CM0Qo=
|
||||
go.wit.com/lib/gui/logsettings v0.13.18 h1:NbhoM0h6dTMRarkWj8BSqnBGi5oAf92FkvE1NA7SpAI=
|
||||
go.wit.com/lib/gui/logsettings v0.13.18/go.mod h1:mBQmNFKoeenjoYH2l1+2Wdk/I0urSD7CKTHT5qMCogE=
|
||||
go.wit.com/lib/gui/repostatus v0.13.18 h1:ANypsZYTtYR8yYngR1fFvrBBOoYD9eGa59ucy31dpBY=
|
||||
go.wit.com/lib/gui/repostatus v0.13.18/go.mod h1:3PoFsx/jVPpi7Yg7+Df+EBH7jddPsXSm0ETyY61qI5A=
|
||||
go.wit.com/log v0.13.18 h1:XJNaQWX+8m12p3mH+kYih3zNjb0kScZDFpJa4c2TvKE=
|
||||
go.wit.com/log v0.13.18/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
|
||||
go.wit.com/widget v1.1.9 h1:iltjAL8UZu0YPfia8/qyfDx04BDxhj8rURcx0OHVBEc=
|
||||
go.wit.com/widget v1.1.9/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
|
|
@ -29,13 +29,13 @@ type section struct {
|
|||
name string
|
||||
hidden bool
|
||||
|
||||
parent *gui.Node
|
||||
box *gui.Node
|
||||
group *gui.Node
|
||||
grid *gui.Node // where the repos are listed
|
||||
hideCB *gui.Node
|
||||
parent *gui.Node
|
||||
box *gui.Node
|
||||
group *gui.Node
|
||||
grid *gui.Node // where the repos are listed
|
||||
hideCB *gui.Node
|
||||
downloadAllB *gui.Node
|
||||
witRepos []*witRepo
|
||||
witRepos []*witRepo
|
||||
}
|
||||
|
||||
func listWindow() {
|
||||
|
@ -91,13 +91,13 @@ func downloadRepo(path string) bool {
|
|||
os.Setenv("GO111MODULE", "off")
|
||||
|
||||
goSrcDir := me.goSrcPwd.String()
|
||||
if ! quickCmd(goSrcDir, []string{"go", "get", "-v", path}) {
|
||||
if !quickCmd(goSrcDir, []string{"go", "get", "-v", path}) {
|
||||
log.Info("go get failed")
|
||||
return false
|
||||
}
|
||||
|
||||
fullpath := filepath.Join(goSrcDir, path)
|
||||
if ! quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) {
|
||||
if !quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) {
|
||||
log.Info("go get depends failed")
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -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("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()
|
||||
log.Info("find the next repo to release here")
|
||||
if findNextDirty() {
|
||||
log.Info("findNextDirty() found a repo")
|
||||
return
|
||||
|
||||
// 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
|
||||
|
|
3
scan.go
3
scan.go
|
@ -140,10 +140,9 @@ func scanGoSum() {
|
|||
repo.newScan()
|
||||
}
|
||||
|
||||
// log.Info("find the next repo to release here")
|
||||
log.Info("repo:", latestversion, status, repo.status.String())
|
||||
}
|
||||
log.Info("scan() did everything, not sure what to do next")
|
||||
log.Info("scanGoSum() did everything, not sure what to do next")
|
||||
}
|
||||
|
||||
// timeFunction takes a function as an argument and returns the execution time.
|
||||
|
|
Loading…
Reference in New Issue