deprecate old go state

This commit is contained in:
Jeff Carr 2024-02-29 21:57:33 -06:00
parent e4769df090
commit ca67fa6cd1
3 changed files with 13 additions and 5 deletions

View File

@ -94,6 +94,7 @@ func (r *RepoRow) LastTag() string {
return r.lastTag.String() return r.lastTag.String()
} }
/*
// returns the state of the GO go.mod and go.sum files // returns the state of the GO go.mod and go.sum files
// this is used to tell if they are valid and correctly reflect // this is used to tell if they are valid and correctly reflect
// the versions of the other GUI packages // the versions of the other GUI packages
@ -124,6 +125,7 @@ func (r *RepoRow) SetGoState(s string) {
} }
r.goState.SetText(s) r.goState.SetText(s)
} }
*/
func (r *RepoRow) IsPerfect() bool { func (r *RepoRow) IsPerfect() bool {
if r.gitState.String() == "PERFECT" { if r.gitState.String() == "PERFECT" {

View File

@ -25,7 +25,7 @@ func (r *RepoRow) Hide() {
r.endBox.Hide() r.endBox.Hide()
// r.statusButton.Hide() // r.statusButton.Hide()
// r.diffButton.Hide() // r.diffButton.Hide()
r.goState.Hide() // r.goState.Hide()
r.targetV.Hide() r.targetV.Hide()
r.hidden = true r.hidden = true
} }
@ -44,7 +44,7 @@ func (r *RepoRow) Show() {
r.endBox.Show() r.endBox.Show()
// r.statusButton.Show() // r.statusButton.Show()
// r.diffButton.Show() // r.diffButton.Show()
r.goState.Show() // r.goState.Show()
r.targetV.Show() r.targetV.Show()
r.hidden = false r.hidden = false
} }
@ -175,7 +175,7 @@ func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
newRepo.gitState = newRepo.Status.MirrorGitState() newRepo.gitState = newRepo.Status.MirrorGitState()
grid.Append(newRepo.gitState) grid.Append(newRepo.gitState)
newRepo.goState = grid.NewLabel("goState") // newRepo.goState = grid.NewLabel("goState")
newRepo.endBox = grid.NewHorizontalBox("HBOX") newRepo.endBox = grid.NewHorizontalBox("HBOX")
newRepo.endBox.NewButton("Configure", func() { newRepo.endBox.NewButton("Configure", func() {
@ -187,6 +187,11 @@ func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
} }
newRepo.Status.Toggle() newRepo.Status.Toggle()
}) })
newRepo.endBox.NewButton("Whitelist", func() {
log.Info("need to implement this")
newRepo.Hide()
})
/*
newRepo.endBox.NewButton("CheckValidGoSum()", func() { newRepo.endBox.NewButton("CheckValidGoSum()", func() {
ok, err := r.CheckValidGoSum(newRepo) ok, err := r.CheckValidGoSum(newRepo)
if err != nil { if err != nil {
@ -195,8 +200,9 @@ func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
} }
if ok { if ok {
log.Info("repo has go.sum requirements that are clean") log.Info("repo has go.sum requirements that are clean")
newRepo.goState.SetText("GOOD") // newRepo.goState.SetText("GOOD")
return return
} }
}) })
*/
} }

View File

@ -47,7 +47,7 @@ type RepoRow struct {
currentName *gui.Node // current branch name currentName *gui.Node // current branch name
currentVersion *gui.Node // current branch version currentVersion *gui.Node // current branch version
gitState *gui.Node // git state (dirty or not?) gitState *gui.Node // git state (dirty or not?)
goState *gui.Node // what is the state of the go.sum file // goState *gui.Node // what is the state of the go.sum file
masterVersion *gui.Node // the master branch version masterVersion *gui.Node // the master branch version
develVersion *gui.Node // the devel branch version develVersion *gui.Node // the devel branch version