diff options
| author | Jeff Carr <[email protected]> | 2024-02-20 23:13:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-20 23:13:26 -0600 |
| commit | 38b1ecab60974813ecf8d64685f2992152b3edf9 (patch) | |
| tree | ee9cd7c32ceec1cf49ac86447a921ae1ced1a972 /addRepo.go | |
| parent | c9f149bcb2ad96f08f3464639517e48a5c3cbdde (diff) | |
add --release builds
Diffstat (limited to 'addRepo.go')
| -rw-r--r-- | addRepo.go | 37 |
1 files changed, 24 insertions, 13 deletions
@@ -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 |
