parent
8c999a6993
commit
3aced19260
8
main.go
8
main.go
|
@ -27,6 +27,7 @@ type repo struct {
|
||||||
bLabel *gui.Node // branch label
|
bLabel *gui.Node // branch label
|
||||||
lastLabel *gui.Node // last tagged version label
|
lastLabel *gui.Node // last tagged version label
|
||||||
vLabel *gui.Node // version label
|
vLabel *gui.Node // version label
|
||||||
|
tagsDrop *gui.Node // list of all tags
|
||||||
sLabel *gui.Node // git state (dirty or not?)
|
sLabel *gui.Node // git state (dirty or not?)
|
||||||
|
|
||||||
cButton *gui.Node // commit button
|
cButton *gui.Node // commit button
|
||||||
|
@ -70,6 +71,9 @@ func (r *repo) scan() {
|
||||||
r.lastLabel.SetText(out)
|
r.lastLabel.SetText(out)
|
||||||
|
|
||||||
r.tags = listFiles(fullpath(r.path + "/.git/refs/tags"))
|
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"
|
// cmd := "dig +noall +answer www.wit.com A"
|
||||||
// out = shell.Run(cmd)
|
// out = shell.Run(cmd)
|
||||||
|
@ -89,6 +93,7 @@ func addRepo(grid *gui.Node, path string) *repo {
|
||||||
newRepo.pLabel = grid.NewLabel(path)
|
newRepo.pLabel = grid.NewLabel(path)
|
||||||
newRepo.bLabel = grid.NewLabel("")
|
newRepo.bLabel = grid.NewLabel("")
|
||||||
newRepo.lastLabel = grid.NewLabel("")
|
newRepo.lastLabel = grid.NewLabel("")
|
||||||
|
newRepo.tagsDrop = grid.NewDropdown("tags")
|
||||||
newRepo.vLabel = grid.NewLabel("")
|
newRepo.vLabel = grid.NewLabel("")
|
||||||
newRepo.sLabel = grid.NewLabel("")
|
newRepo.sLabel = grid.NewLabel("")
|
||||||
|
|
||||||
|
@ -109,11 +114,12 @@ func helloworld() {
|
||||||
|
|
||||||
box := win.Box().NewBox("bw vbox", false)
|
box := win.Box().NewBox("bw vbox", false)
|
||||||
group := box.NewGroup("test")
|
group := box.NewGroup("test")
|
||||||
grid := group.NewGrid("test", 7, 1)
|
grid := group.NewGrid("test", 8, 1)
|
||||||
|
|
||||||
grid.NewLabel("go repo")
|
grid.NewLabel("go repo")
|
||||||
grid.NewLabel("branch")
|
grid.NewLabel("branch")
|
||||||
grid.NewLabel("last tag")
|
grid.NewLabel("last tag")
|
||||||
|
grid.NewLabel("tags")
|
||||||
grid.NewLabel("Version")
|
grid.NewLabel("Version")
|
||||||
grid.NewLabel("is dirty?")
|
grid.NewLabel("is dirty?")
|
||||||
grid.NewLabel("commit")
|
grid.NewLabel("commit")
|
||||||
|
|
Loading…
Reference in New Issue