guireleaser runs again

This commit is contained in:
Jeff Carr 2024-02-18 15:09:35 -06:00
parent 02542bafe8
commit dc0040f080
4 changed files with 31 additions and 5 deletions

View File

@ -21,6 +21,7 @@ func (r *Repo) Hide() {
r.endBox.Hide()
// r.statusButton.Hide()
// r.diffButton.Hide()
r.goSumStatus.Hide()
r.hidden = true
}
@ -41,6 +42,7 @@ func (r *Repo) Show() {
r.endBox.Show()
// r.statusButton.Show()
// r.diffButton.Show()
r.goSumStatus.Show()
r.hidden = false
}
@ -138,9 +140,10 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
}
newRepo.goSumStatus = r.blind.NewLabel("in the blind")
case "guireleaser":
newRepo.develVersion = grid.NewLabel("").SetProgName("develVersion")
newRepo.userVersion = grid.NewLabel("").SetProgName("userVersion")
newRepo.develVersion = r.blind.NewLabel("").SetProgName("develVersion")
newRepo.userVersion = r.blind.NewLabel("").SetProgName("userVersion")
newRepo.dirtyLabel = grid.NewLabel("")
newRepo.goSumStatus = grid.NewLabel("in the blind")
newRepo.vLabel = grid.NewLabel("").SetProgName("current")
newRepo.endBox = grid.NewHorizontalBox("HBOX")
newRepo.endBox.NewButton("Configure", func() {
@ -168,7 +171,6 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
newRepo.Status.Build()
})
}
newRepo.goSumStatus = r.blind.NewLabel("in the blind")
default:
}
grid.NextRow()

View File

@ -16,6 +16,11 @@ func (r *RepoList) Hide() {
r.reposbox.Hide()
}
func (r *RepoList) FindRepo(path string) *Repo {
repo, _ := me.allrepos[path]
return repo
}
func (r *RepoList) AllRepos() []*Repo {
var all []*Repo
for _, repo := range me.allrepos {
@ -71,6 +76,25 @@ func (r *Repo) ReadOnly() bool {
return r.Status.ReadOnly()
}
func (r *Repo) LastTag() string {
return r.Status.GetLastTagVersion()
}
// returns the state of the GO go.mod and go.sum files
// this is used to tell if they are valid and correctly reflect
// the versions of the other GUI packages
// at this point in time, there is _NO_ way to be check our
// be sure that anything will run with older versions
// because this are changing too often at this point
// TODO: revisit this in 2025 or 2026
func (r *Repo) GoState() string {
return r.Status.GetGoSumStatus()
}
func (r *Repo) SetGoState(s string) {
r.Status.SetGoSumStatus(s)
}
func (r *Repo) IsPerfect() bool {
if r.dirtyLabel.String() == "PERFECT" {
return true

View File

@ -14,7 +14,7 @@ func (r *RepoList) SetAutoScan(b bool) {
func (r *RepoList) ScanRepositories() (int, string) {
var i int
t := timeFunction(func() {
t := TimeFunction(func() {
for _, repo := range me.allrepos {
i += 1
repo.NewScan()

View File

@ -47,7 +47,7 @@ func (r *RepoList) Watchdog(f func()) {
}
// timeFunction takes a function as an argument and returns the execution time.
func timeFunction(f func()) time.Duration {
func TimeFunction(f func()) time.Duration {
startTime := time.Now() // Record the start time
f() // Execute the function
return time.Since(startTime) // Calculate the elapsed time