summaryrefslogtreecommitdiff
path: root/globalTestingOptions.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-20 17:17:48 -0600
committerJeff Carr <[email protected]>2024-01-20 17:17:48 -0600
commit5f382cd5e317b7d76ff231e086de316fe5d4b626 (patch)
treee58c8121776a12d503d62103e7e5e25b31812af2 /globalTestingOptions.go
parentd67ace479ae36375cc7bd10f316c65081b5abd1b (diff)
more button cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'globalTestingOptions.go')
-rw-r--r--globalTestingOptions.go80
1 files changed, 80 insertions, 0 deletions
diff --git a/globalTestingOptions.go b/globalTestingOptions.go
new file mode 100644
index 0000000..283d296
--- /dev/null
+++ b/globalTestingOptions.go
@@ -0,0 +1,80 @@
+package main
+
+import (
+ "os"
+ "strings"
+
+ "go.wit.com/log"
+
+ "go.wit.com/gui"
+)
+
+// 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()
+ })
+
+ var everything *gui.Node
+ everything = test1.NewButton("go get everything on go.wit.com", func() {
+ quickCmdDoNotRun = false
+ quickCmds = [][]string{}
+ var perfect bool = true
+ repos := myrepolist()
+ for _, line := range repos {
+ log.Warn("repo =", line)
+ path, _, _, _ := splitLine(line)
+ path = strings.TrimSpace(path)
+ if path == "#" {
+ // skip comment lines
+ continue
+ }
+ if doesExist("/home/jcarr/go/src/" + path) {
+ continue
+ }
+ // attempt to download it
+ quickCmd("/home/jcarr/go/src/go.wit.com", []string{"go", "get", "-v", path})
+ perfect = false
+ }
+
+ if perfect {
+ var notes [][]string
+ notes = append(notes, []string{"you have already downloaded"})
+ notes = append(notes, []string{"everything on go.wit.com"})
+ me.script = notes
+ setGitCommands()
+ doit.Disable()
+ everything.Disable()
+ return
+ }
+
+ me.script = quickCmds
+ doit.Enable()
+ setGitCommands()
+ })
+ test1.NewButton("build all apps", func() {
+ listWindow()
+ })
+}