From 5d21e2f6f8ba1b62a848c6b614e98cea530bc085 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 10 Jan 2024 19:44:10 -0600 Subject: [PATCH] cleaner again Signed-off-by: Jeff Carr --- update.go | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/update.go b/update.go index 0ab1709..c5fb29a 100644 --- a/update.go +++ b/update.go @@ -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()