cleaner again

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-10 19:44:10 -06:00
parent 1c02e4d05f
commit 5d21e2f6f8
1 changed files with 26 additions and 18 deletions

View File

@ -17,15 +17,23 @@ func (rs *RepoStatus) Update() {
log.Log(WARN, "Update() START")
duration := timeFunction(func () {
// do things that are safe even if the git tree is dirty
log.Warn("path.Set()")
rs.path.Set(rs.repopath)
log.Warn("getCurrentBranchName()")
rs.getCurrentBranchName()
log.Warn("set window Title()")
rs.window.Title(rs.repopath + " GO repo Details")
log.Warn("getCurrentBranchVersion()")
rs.getCurrentBranchVersion()
log.Warn("getLastTagVersion()")
rs.getLastTagVersion()
log.Warn("populateTags()")
rs.populateTags()
log.Warn("checkDirty()")
rs.checkDirty()
if rs.checkDirty() {
if rs.dirtyLabel.Get() != "no" {
log.Warn("dirty label != no. actual value:", rs.dirtyLabel.Get())
rs.DisableEverything()
return
}
@ -42,7 +50,6 @@ func (rs *RepoStatus) Update() {
rs.checkoutBranch("jcarr")
rs.recommend()
}
})
rs.setSpeed(duration)
log.Log(WARN, "Update() END")
@ -67,6 +74,7 @@ func (rs *RepoStatus) setSpeed(duration time.Duration) {
// disable all things besides Update() button
func (rs *RepoStatus) DisableEverything() {
log.Warn("DisableEverything()")
// choosing a major, minor or revision
rs.major.Disable()