further automation

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-02 17:56:59 -06:00
parent 68bdcebd85
commit be60237c1c
2 changed files with 18 additions and 7 deletions

View File

@ -55,6 +55,7 @@ func globalDisplayOptions(box *gui.Node) {
scanForReady() scanForReady()
scanForReady() scanForReady()
reposwin.Toggle() reposwin.Toggle()
findNextDirty("")
}) })
me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true) me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)

View File

@ -307,6 +307,7 @@ func createReleaseBox(box *gui.Node) {
buttonEnable() buttonEnable()
}) })
/*
release.grid.NewButton("CheckPrimativeGoMod()", func() { release.grid.NewButton("CheckPrimativeGoMod()", func() {
tmp := release.current.String() tmp := release.current.String()
log.Info("Run CheckGoSum on repo:", tmp) log.Info("Run CheckGoSum on repo:", tmp)
@ -317,6 +318,13 @@ func createReleaseBox(box *gui.Node) {
} }
}) })
*/
release.makeRedomodB = release.grid.NewButton("make redomod", func() {
buttonDisable()
release.current.status.MakeRedomod()
buttonEnable()
})
release.grid.NewButton("goodCheckGoSum()", func() { release.grid.NewButton("goodCheckGoSum()", func() {
buttonDisable() buttonDisable()
@ -327,11 +335,6 @@ func createReleaseBox(box *gui.Node) {
} }
buttonEnable() buttonEnable()
}) })
release.makeRedomodB = release.grid.NewButton("make redomod", func() {
buttonDisable()
release.current.status.MakeRedomod()
buttonEnable()
})
} }
func goodCheckGoSum() bool { func goodCheckGoSum() bool {
@ -347,10 +350,15 @@ func goodCheckGoSum() bool {
repo, ok := me.allrepos[depname] repo, ok := me.allrepos[depname]
if ok { if ok {
goSumS := repo.getGoSumStatus() goSumS := repo.getGoSumStatus()
// ignore dependencies on whitelisted repos
// TODO: warn the user about the whitelist
if goSumS == "WHITELIST" { if goSumS == "WHITELIST" {
continue continue
} }
if release.current.status.ReadOnly() { // check if the dependent repo is ReadOnly
// if so, there isn't anything we can do about
// version mis-matches
if repo.status.ReadOnly() {
continue continue
} }
lastS := repo.status.GetLastTagVersion() lastS := repo.status.GetLastTagVersion()
@ -358,6 +366,8 @@ func goodCheckGoSum() bool {
log.Info(" repo deps:", depname, version, "vs", goSumS, lastS, targetS) log.Info(" repo deps:", depname, version, "vs", goSumS, lastS, targetS)
if lastS != targetS { if lastS != targetS {
log.Info("repo deps: FALSE lastS != targetS", lastS, targetS) log.Info("repo deps: FALSE lastS != targetS", lastS, targetS)
log.Info("repo deps: FALSE status.ReadOnly()", release.current.status.ReadOnly())
log.Info("repo deps: FALSE path", release.current.String())
maybe = false maybe = false
} }
} else { } else {