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,32 +17,39 @@ 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" {
rs.DisableEverything()
return
}
// rs.checkDirty() this runs
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch master")
rs.checkoutBranch("master")
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch devel")
rs.checkoutBranch("devel")
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch jcarr")
rs.checkoutBranch("jcarr")
rs.recommend()
if rs.dirtyLabel.Get() != "no" {
log.Warn("dirty label != no. actual value:", rs.dirtyLabel.Get())
rs.DisableEverything()
return
}
// rs.checkDirty() this runs
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch master")
rs.checkoutBranch("master")
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch devel")
rs.checkoutBranch("devel")
log.Log(WARN, "")
log.Log(WARN, "checkoutBranch jcarr")
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()