auto scan on window open

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-02 17:42:48 -06:00
parent cbe45ed22d
commit 68bdcebd85
2 changed files with 12 additions and 20 deletions

View File

@ -52,6 +52,8 @@ func globalDisplayOptions(box *gui.Node) {
group1.NewButton("Show Repository Window", func() {
showHideRepos()
scanForReady()
scanForReady()
reposwin.Toggle()
})

View File

@ -74,7 +74,6 @@ func createReleaseBox(box *gui.Node) {
release.grid.NewButton("scan for Ready", func() {
me.Disable()
scanForReady()
scanForReady()
me.Enable()
})
release.grid.NewButton("findNextDirty()", func() {
@ -319,10 +318,13 @@ func createReleaseBox(box *gui.Node) {
})
release.grid.NewButton("reset with scanGoSum()", func() {
release.grid.NewButton("goodCheckGoSum()", func() {
buttonDisable()
// do an initial scan of all the repos
scanGoSum()
if goodCheckGoSum() {
log.Info("goodCheckGoSum() GOOD")
} else {
log.Info("goodCheckGoSum() FAILED")
}
buttonEnable()
})
release.makeRedomodB = release.grid.NewButton("make redomod", func() {
@ -330,22 +332,6 @@ func createReleaseBox(box *gui.Node) {
release.current.status.MakeRedomod()
buttonEnable()
})
release.goGetB = release.grid.NewButton("go get -v -u .", func() {
buttonDisable()
err, output := release.current.status.RunCmd([]string{"go", "get", "-v", "-u", "."})
log.Warn(output)
if err == nil {
log.Warn("go get worked. recheck go.sum")
} else {
log.Warn("go get failed")
}
buttonEnable()
})
release.goGetB = release.grid.NewButton("SetMainWorkingName(guimaster)", func() {
buttonDisable()
release.current.status.SetMainWorkingName("guimaster")
buttonEnable()
})
}
func goodCheckGoSum() bool {
@ -364,10 +350,14 @@ func goodCheckGoSum() bool {
if goSumS == "WHITELIST" {
continue
}
if release.current.status.ReadOnly() {
continue
}
lastS := repo.status.GetLastTagVersion()
targetS := repo.targetVersion.String()
log.Info(" repo deps:", depname, version, "vs", goSumS, lastS, targetS)
if lastS != targetS {
log.Info(" repo deps: FALSE lastS != targetS", lastS, targetS)
maybe = false
}
} else {