diff options
| author | Jeff Carr <[email protected]> | 2024-01-17 03:59:13 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-17 03:59:13 -0600 |
| commit | 2f222b0bd73898a31db62e2b9169463f017d73dd (patch) | |
| tree | ad1dc9fa3d1575ed6027e0559368f36b7e4662dc /git.go | |
| parent | cf3d56475d805bfb79a905d6cc8b3bf4f773f213 (diff) | |
compiles, runs, but displays is blank
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -13,28 +13,28 @@ func (rs *RepoStatus) GetPath() string { } func (rs *RepoStatus) GetCurrentBranchName() string { - return rs.currentBranch.Get() + return rs.currentBranch.String() } func (rs *RepoStatus) GetCurrentBranchVersion() string { - return rs.currentVersion.Get() + return rs.currentVersion.String() } func (rs *RepoStatus) GetLastTagVersion() string { - return rs.lasttag.Get() + return rs.lasttag.String() } func (rs *RepoStatus) getCurrentBranchName() string { out := run(rs.repopath, "git", "branch --show-current") log.Warn("getCurrentBranchName() =", out) - rs.currentBranch.Set(out) + rs.currentBranch.SetText(out) return out } func (rs *RepoStatus) getCurrentBranchVersion() string { out := run(rs.repopath, "git", "describe --tags") log.Warn("getCurrentBranchVersion()", out) - rs.currentVersion.Set(out) + rs.currentVersion.SetText(out) return out } @@ -46,9 +46,9 @@ func (rs *RepoStatus) getLastTagVersion() string { lastreal := "describe --tags " + out // out = run(r.path, "git", "describe --tags c871d5ecf051a7dc4e3a77157cdbc0a457eb9ae1") out = run(rs.repopath, "git", lastreal) - rs.lasttag.Set(out) - rs.tagsDrop.Set(out) - // rs.lastLabel.Set(out) + rs.lasttag.SetText(out) + rs.tagsDrop.SetText(out) + // rs.lastLabel.SetText(out) return out } @@ -58,11 +58,11 @@ func (rs *RepoStatus) populateTags() { for _, tag := range listFiles(tmp) { if rs.tags[tag] == "" { log.Warn("populateTags() Adding new tag", tag) - rs.tagsDrop.Add(tag) + rs.tagsDrop.AddText(tag) rs.tags[tag] = "origin" } } - // rs.tagsDrop.Set(rs.lasttagrev) + // rs.tagsDrop.SetText(rs.lasttagrev) } /* @@ -104,17 +104,17 @@ func (rs *RepoStatus) CheckDirty() bool { log.Warn("CheckDirty() out =", out) log.Warn("CheckDirty() err =", err) log.Error(err, "CheckDirty() error") - rs.dirtyLabel.Set("error") + rs.dirtyLabel.SetText("error") return true } if b { log.Warn("CheckDirty() b =", b, "path =", path, "out =", out) log.Warn("CheckDirty() no", rs.repopath) - rs.dirtyLabel.Set("no") + rs.dirtyLabel.SetText("no") return false } log.Warn("CheckDirty() true", rs.repopath) - rs.dirtyLabel.Set("dirty") + rs.dirtyLabel.SetText("dirty") return true } @@ -142,61 +142,61 @@ func (rs *RepoStatus) checkoutBranch(level string, branch string) { switch level { case "master": - rs.masterBranchVersion.Set(realversion) + rs.masterBranchVersion.SetText(realversion) case "devel": - rs.develBranchVersion.Set(realversion) + rs.develBranchVersion.SetText(realversion) case "user": - rs.userBranchVersion.Set(realversion) + rs.userBranchVersion.SetText(realversion) default: } } func (rs *RepoStatus) SetMasterName(s string) { - rs.masterDrop.Set(s) + rs.masterDrop.SetText(s) rs.masterBranchVersion.SetLabel(s) // rs.major.SetTitle(s) } func (rs *RepoStatus) SetDevelName(s string) { - rs.develDrop.Set(s) + rs.develDrop.SetText(s) rs.develBranchVersion.SetLabel(s) } func (rs *RepoStatus) SetUserName(s string) { - rs.userDrop.Set(s) + rs.userDrop.SetText(s) rs.userBranchVersion.SetLabel(s) } // returns "master", "devel", os.Username, etc func (rs *RepoStatus) GetMasterName() string { - name := rs.masterDrop.Get() + name := rs.masterDrop.String() log.Warn("GetMasterName() =", name) return name } func (rs *RepoStatus) GetDevelName() string { - name := rs.develDrop.Get() + name := rs.develDrop.String() log.Warn("GetDevelName() =", name) return name } func (rs *RepoStatus) GetUserName() string { - name := rs.userDrop.Get() + name := rs.userDrop.String() log.Warn("GetUserName() =", name) return name } // returns the git versions like "1.3-2-laksdjf" or whatever func (rs *RepoStatus) GetMasterVersion() string { - name := rs.masterBranchVersion.Get() + name := rs.masterBranchVersion.String() log.Warn("GetMasterVersion() =", name) return name } func (rs *RepoStatus) GetDevelVersion() string { - name := rs.develBranchVersion.Get() + name := rs.develBranchVersion.String() log.Warn("GetBranchVersion() =", name) return name } func (rs *RepoStatus) GetUserVersion() string { - name := rs.userBranchVersion.Get() + name := rs.userBranchVersion.String() log.Warn("GetUserVersion() =", name) return name } |
