diff options
| author | Jeff Carr <[email protected]> | 2025-01-07 04:58:05 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-07 04:58:05 -0600 |
| commit | 904a5e8568b1e1640008a219dd1418a04c53bd7f (patch) | |
| tree | a7a9172ab01cc7c046964c78246e7d7630a969cc /update.go | |
| parent | 2ea1113c7211d09ee2637a00645f1b318fb855f8 (diff) | |
remove lots of old stuff!
Diffstat (limited to 'update.go')
| -rw-r--r-- | update.go | 32 |
1 files changed, 9 insertions, 23 deletions
@@ -11,7 +11,7 @@ import ( func (rs *RepoStatus) gitBranchAll() { r := rs.Run([]string{"git", "branch", "--all"}) if r.Error != nil { - log.Log(WARN, "git branch failed string =", rs.String()) + log.Log(WARN, "git branch failed string =", rs.Path()) log.Log(WARN, "git branch failed realpath =", rs.realPath.String()) return } @@ -27,6 +27,8 @@ func (rs *RepoStatus) updateNew() { return } + pb := rs.pb + // store the current checked out branch name and version rs.checkCurrentBranchName() rs.checkCurrentBranchVersion() @@ -35,33 +37,17 @@ func (rs *RepoStatus) updateNew() { rs.populateTags() // record if the repo is dirty - rs.CheckDirty() + pb.CheckDirty() // store the last tag version rs.setLastTagVersion() // store the master branch version - mName := rs.GetMasterBranchName() - out, _ := rs.gitDescribeByName(mName) - rs.setMasterVersion(out) - - // store the devel branch version - dName := rs.GetDevelBranchName() - if dName == "" { - rs.setDevelVersion("") - } else { - out, _ = rs.gitDescribeByName(dName) - rs.setDevelVersion(out) - } + ver := pb.GetMasterVersion() + rs.mainBranchVersion.SetValue(ver) - // store the user branch version - uName := rs.GetUserBranchName() - if uName == "" { - rs.setUserVersion("") - } else { - out, _ = rs.gitDescribeByName(uName) - rs.setUserVersion(out) - } + rs.develBranchVersion.SetValue(pb.GetDevelVersion()) + rs.userBranchVersion.SetValue(pb.GetUserVersion()) // populates a string into the rs.gitState widget // todo: make the values from this function a bit cleaner @@ -151,7 +137,7 @@ func (rs *RepoStatus) EnableSelectTag() { // force there to be a commit message rs.releaseVersion.Disable() } else { - rs.generateCmd() + // rs.generateCmd() rs.releaseVersion.Enable() } } |
