From 0d01d8276659a0ed56827f23e41fc0b0a7304f83 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Jan 2024 09:56:33 -0600 Subject: gets jcarr,devel and master branch info Signed-off-by: Jeff Carr --- main.go | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 953294e..511d40c 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,11 @@ type repo struct { 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?) + dirtyLabel *gui.Node // git state (dirty or not?) + + masterVersion *gui.Node // the master branch version + develVersion *gui.Node // the devel branch version + jcarrVersion *gui.Node // the jcarr branch version cButton *gui.Node // commit button pButton *gui.Node // push button @@ -34,6 +38,12 @@ func main() { myGui = gui.New().Default() helloworld() + checkrepos() + for _, r := range allrepos { + r.checkoutBranch("master") + r.checkoutBranch("devel") + r.checkoutBranch("jcarr") + } gui.Watchdog() } @@ -46,7 +56,11 @@ func addRepo(grid *gui.Node, path string) *repo { newRepo.lastLabel = grid.NewLabel("") newRepo.tagsDrop = grid.NewDropdown("tags") newRepo.vLabel = grid.NewLabel("") - newRepo.sLabel = grid.NewLabel("") + + newRepo.masterVersion = grid.NewLabel("") + newRepo.develVersion = grid.NewLabel("") + newRepo.jcarrVersion = grid.NewLabel("") + newRepo.dirtyLabel = grid.NewLabel("") newRepo.cButton = grid.NewButton("commit", func () { log.Println("commit") @@ -66,13 +80,16 @@ func helloworld() { box := win.Box().NewBox("bw vbox", false) box2 := win.Box().NewBox("bw vbox", false) group := box.NewGroup("test") - grid := group.NewGrid("test", 8, 1) + grid := group.NewGrid("test", 11, 1) grid.NewLabel("go repo") grid.NewLabel("branch") grid.NewLabel("last tag") - grid.NewLabel("tags") grid.NewLabel("Version") + grid.NewLabel("tags") + grid.NewLabel("master") + grid.NewLabel("devel") + grid.NewLabel("jcarr") grid.NewLabel("is dirty?") grid.NewLabel("commit") grid.NewLabel("push to") @@ -90,9 +107,6 @@ func helloworld() { addRepo(grid, "go.wit.com/gui/digitalocean") addRepo(grid, "go.wit.com/gui/cloudflare") - box2.NewButton("checkrepos()", func () { - checkrepos() - }) box2.NewButton("checkout jcarr (all repos)", func () { for _, r := range allrepos { r.checkoutBranch("jcarr") -- cgit v1.2.3