diff options
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 |
