diff options
Diffstat (limited to 'globalTestingOptions.go')
| -rw-r--r-- | globalTestingOptions.go | 67 |
1 files changed, 44 insertions, 23 deletions
diff --git a/globalTestingOptions.go b/globalTestingOptions.go index 77fe2b8..a920b8b 100644 --- a/globalTestingOptions.go +++ b/globalTestingOptions.go @@ -4,6 +4,7 @@ import ( "os" "strings" + "go.wit.com/lib/gui/repostatus" "go.wit.com/log" "go.wit.com/gui" @@ -12,29 +13,12 @@ import ( // things being testing func globalTestingOptions(box *gui.Node) { test1 := box.NewGroup("testing build") - test1.NewButton("rebuild autotypist", func() { - os.Setenv("GO111MODULE", "off") - quickCmdDoNotRun = true - quickCmdLastPath = "~/go/src" - quickCmds = [][]string{} - log.Warn("scanning allrepos") - fullpath := "/home/jcarr/" - quickCmd(fullpath, []string{"mkdir", "-p", "/home/jcarr/go/src/go.wit.com/apps/"}) - - fullpath = "/home/jcarr/go/src/go.wit.com/apps/" - quickCmd(fullpath, []string{"go", "get", "go.wit.com/apps/autotypist"}) - fullpath = "/home/jcarr/go/src/go.wit.com/apps/autotypist" - quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/debian"}) - - fullpath = "/home/jcarr/go/src/go.wit.com/toolkits/debian" - quickCmd(fullpath, []string{"make", "download"}) - quickCmd(fullpath, []string{"make"}) - - fullpath = "/home/jcarr/go/src/go.wit.com/apps/autotypist" - quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) - quickCmd(fullpath, []string{"go", "build", "-v", "-x"}) - me.script = quickCmds - setGitCommands() + me.autoRebuildButton = test1.NewButton("rebuild autotypist", func() { + me.autoRebuildButton.Disable() + me.autoRebuildButton.SetLabel("running....") + attemptAutoRebuild() + me.autoRebuildButton.Enable() + me.autoRebuildButton.SetLabel("rebuild autotypist") }) var everything *gui.Node @@ -78,4 +62,41 @@ func globalTestingOptions(box *gui.Node) { test1.NewButton("build all apps", func() { listWindow() }) + test1.NewButton("repostatus.ListAll()", func() { + repostatus.ListAll() + }) +} + +func attemptAutoRebuild() { + os.Setenv("GO111MODULE", "off") + quickCmdDoNotRun = false + + fullpath := "/home/jcarr/go/" + quickCmd(fullpath, []string{"mkdir", "-p", "/home/jcarr/go/src/go.wit.com/apps/"}) + fullpath = "/home/jcarr/go/src/go.wit.com/apps/" + + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/apps/autotypist"}) + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/debian"}) + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/tree"}) + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/nocui"}) + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/gocui"}) + quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/andlabs"}) + + fullpath = "/home/jcarr/go/src/go.wit.com/toolkits/nocui/" + quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) + quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../nocui.so"}) + + fullpath = "/home/jcarr/go/src/go.wit.com/toolkits/gocui/" + quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) + quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../gocui.so"}) + + fullpath = "/home/jcarr/go/src/go.wit.com/toolkits/andlabs/" + quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) + quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../andlabs.so"}) + + fullpath = "/home/jcarr/go/src/go.wit.com/apps/autotypist" + quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."}) + quickCmd(fullpath, []string{"go", "build", "-v", "-x"}) + me.script = quickCmds + setGitCommands() } |
