From 38b1ecab60974813ecf8d64685f2992152b3edf9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 20 Feb 2024 23:13:26 -0600 Subject: add --release builds --- addRepo.go | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'addRepo.go') diff --git a/addRepo.go b/addRepo.go index 4371cd6..f679107 100644 --- a/addRepo.go +++ b/addRepo.go @@ -25,12 +25,12 @@ func (c *controlBox) addRepo(path string) { return } - if repostatus.VerifyLocalGoRepo(path) { - log.Verbose("path actually exists", path) - } else { - log.Warn("repostatus.VerifyLocalGoRepo() failed for for", path) - return - } + // if repostatus.VerifyLocalGoRepo(path) { + // log.Verbose("path actually exists", path) + // } else { + // log.Warn("repostatus.VerifyLocalGoRepo() failed for for", path) + // return + // } c.pathL = gadgets.NewOneLiner(c.grid, "path") c.pathL.SetText(path) @@ -54,10 +54,15 @@ func (c *controlBox) addRepo(path string) { c.tagDate = gadgets.NewOneLiner(c.grid, "git tag Date") c.grid.NextRow() - c.status = repostatus.NewRepoStatusWindow(path) - c.status.SetMainWorkingName("master") - c.status.SetDevelWorkingName("devel") - c.status.SetUserWorkingName("jcarr") + err, repo := repostatus.NewRepoStatusWindow(path) + if err != nil { + log.Info("path did not work", path, err) + return + } + c.status = repo + // c.status.SetMainWorkingName("master") + // c.status.SetDevelWorkingName("devel") + // c.status.SetUserWorkingName("jcarr") c.status.Update() cbname := c.status.GetCurrentBranchName() @@ -71,17 +76,23 @@ func (c *controlBox) addRepo(path string) { c.dirtyL.SetText("false") } + lasttag := c.status.GetLastTagVersion() + if args.Release { + debversion = lasttag + debversion = strings.TrimPrefix(debversion, "v") + c.dirtyL.SetText("false") + } + c.Version.SetText(debversion) - lasttag := c.status.GetLastTagVersion() c.lastTag.SetText(lasttag) c.currentL.SetText(cbname + " " + cbversion) tagDate := c.getDateStamp(lasttag) c.tagDate.SetText(tagDate) - if c.status.Changed() { - log.Warn("should scan here") + if s, ok := c.status.Changed(); ok { + log.Warn("should scan here", s) } return -- cgit v1.2.3