summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-09 08:41:32 -0600
committerJeff Carr <[email protected]>2024-01-09 08:41:32 -0600
commit3aced19260bfac158f78730b1259cba51b059321 (patch)
treef2d83f8954bbcaea64c1b600af1369626010d47d /main.go
parent8c999a6993d8624c2cb84b8c43bd94487d6646c5 (diff)
tag dropdown
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index 286995d..f0a6280 100644
--- a/main.go
+++ b/main.go
@@ -27,6 +27,7 @@ type repo struct {
bLabel *gui.Node // branch label
lastLabel *gui.Node // last tagged version label
vLabel *gui.Node // version label
+ tagsDrop *gui.Node // list of all tags
sLabel *gui.Node // git state (dirty or not?)
cButton *gui.Node // commit button
@@ -70,6 +71,9 @@ func (r *repo) scan() {
r.lastLabel.SetText(out)
r.tags = listFiles(fullpath(r.path + "/.git/refs/tags"))
+ for _, tag := range r.tags {
+ r.tagsDrop.AddText(tag)
+ }
// cmd := "dig +noall +answer www.wit.com A"
// out = shell.Run(cmd)
@@ -89,6 +93,7 @@ func addRepo(grid *gui.Node, path string) *repo {
newRepo.pLabel = grid.NewLabel(path)
newRepo.bLabel = grid.NewLabel("")
newRepo.lastLabel = grid.NewLabel("")
+ newRepo.tagsDrop = grid.NewDropdown("tags")
newRepo.vLabel = grid.NewLabel("")
newRepo.sLabel = grid.NewLabel("")
@@ -109,11 +114,12 @@ func helloworld() {
box := win.Box().NewBox("bw vbox", false)
group := box.NewGroup("test")
- grid := group.NewGrid("test", 7, 1)
+ grid := group.NewGrid("test", 8, 1)
grid.NewLabel("go repo")
grid.NewLabel("branch")
grid.NewLabel("last tag")
+ grid.NewLabel("tags")
grid.NewLabel("Version")
grid.NewLabel("is dirty?")
grid.NewLabel("commit")