diff options
| author | Jeff Carr <[email protected]> | 2024-01-31 00:19:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-31 00:19:21 -0600 |
| commit | 3600d4c9c1b9eb0112d2c4bfb10b896a723d3ff7 (patch) | |
| tree | 2a8effbb502e2969d23d05e0d715d5d9926c65ef /globalBuildOptions.go | |
| parent | 6d59e0f0f7db343b00748a98e19286994fcbf19f (diff) | |
allow switching all branches
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'globalBuildOptions.go')
| -rw-r--r-- | globalBuildOptions.go | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/globalBuildOptions.go b/globalBuildOptions.go index e9aa180..0641d08 100644 --- a/globalBuildOptions.go +++ b/globalBuildOptions.go @@ -84,28 +84,39 @@ func globalBuildOptions(box *gui.Node) { me.userBranch = gadgets.NewBasicCombobox(grid, "default user branch") me.userBranch.AddText(usr.Username) - grid.NewLabel("<nil>") - grid.NewButton("set working branches", func() { - log.Warn("set working branches here") - }) + var newBranch *gui.Node + var setBranchB *gui.Node + // gadgets.OneLiner(grid, "default user branch") // select the branch you want to test, build and develop against // this lets you select your user branch, but, when you are happy // you can merge everything into the devel branch and make sure it actually // works. Then, when that is good, merge and version everything in master - var newBranch *gui.Node - grid.NewButton("set current branch to:", func() { + setBranchB = grid.NewButton("set current branch to:", func() { log.Warn("set current branch to:", newBranch.String()) /* me.toMoveToBranch = guiBranch.String() setCurrentBranch.SetLabel("set all branches to " + me.toMoveToBranch) me.mainBranch.Disable() */ + for _, repo := range me.allrepos { + if repo.status.CheckoutMaster() { + log.Warn("set master branch worked", repo.String) + repo.newScan() + } else { + log.Warn("set master branch failed", repo.String) + repo.newScan() + } + // return + } }) newBranch = grid.NewCombobox() newBranch.AddText("master") newBranch.AddText("devel") newBranch.AddText(usr.Username) newBranch.SetText(usr.Username) + newBranch.Custom = func () { + setBranchB.SetLabel("set current branches to " + newBranch.String()) + } } |
