summaryrefslogtreecommitdiff
path: root/addRepo.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-20 23:13:26 -0600
committerJeff Carr <[email protected]>2024-02-20 23:13:26 -0600
commit38b1ecab60974813ecf8d64685f2992152b3edf9 (patch)
treeee9cd7c32ceec1cf49ac86447a921ae1ced1a972 /addRepo.go
parentc9f149bcb2ad96f08f3464639517e48a5c3cbdde (diff)
add --release builds
Diffstat (limited to 'addRepo.go')
-rw-r--r--addRepo.go37
1 files changed, 24 insertions, 13 deletions
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