From 3c3dc5309a9b7b0c16de81333c569674c6c26ee8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 24 Jan 2024 01:57:01 -0600 Subject: [PATCH] release automation Signed-off-by: Jeff Carr --- draw.go | 9 +++++++++ gitConfig.go | 12 ++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/draw.go b/draw.go index cbad66b..c59af83 100644 --- a/draw.go +++ b/draw.go @@ -222,6 +222,15 @@ func (rs *RepoStatus) drawGitCommands() { newgrid.Pad() } + +func (rs *RepoStatus) SetVersion(a, b, c string, reason string) { + rs.major.SetText(a) + rs.minor.SetText(b) + rs.revision.SetText(c) + + rs.versionMessage.SetLabel(reason) +} + func (rs *RepoStatus) setTag() bool { lasttag := rs.lasttag.String() var major, minor, revision string diff --git a/gitConfig.go b/gitConfig.go index cccad74..f829c61 100644 --- a/gitConfig.go +++ b/gitConfig.go @@ -298,15 +298,11 @@ func (rs *RepoStatus) CheckGoSum() bool { return false } log.Log(WARN, " FOUND", newrs.String()) - /* - for branch, _ := range rs.gitConfig.branches { - log.Log(WARN, " ", branch) - } - */ - userhash, _ := newrs.gitConfig.hashes["jcarr"] + username := newrs.userWorkingName.String() + userhash, _ := newrs.gitConfig.hashes[username] userversion, _ := newrs.gitConfig.versions[userhash] - log.Log(WARN, " jcarr", userhash) - log.Log(WARN, " jcarr", userversion) + log.Log(WARN, " username :" + username, userhash) + log.Log(WARN, " username :" + username, userversion) if version == userversion { log.Log(WARN, " USER VERSIONS MATCH", version, userversion) } else {