summaryrefslogtreecommitdiff
path: root/repolist.go
diff options
context:
space:
mode:
Diffstat (limited to 'repolist.go')
-rw-r--r--repolist.go70
1 files changed, 30 insertions, 40 deletions
diff --git a/repolist.go b/repolist.go
index 749d930..61a53f4 100644
--- a/repolist.go
+++ b/repolist.go
@@ -154,25 +154,6 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
}
me.reposwin.Enable()
})
- newRepo.endBox.NewButton("build", func() {
- switch newRepo.status.RepoType() {
- case "binary":
- log.Info("compile here. Show()")
- case "library":
- log.Info("library here. Hide()")
- default:
- log.Info("unknown. Show()")
- }
-
- /*
- err, output := newRepo.status.RunCmd([]string{"go", "list", "-f", "'{{if eq .Name \"main\"}}binary{{else}}library{{end}}'"})
- if err != nil {
- log.Info("package is: unknown", err)
- return
- }
- output = strings.Trim(output, "'")
- */
- })
newRepo.status = repostatus.NewRepoStatusWindow(newRepo.path)
newRepo.hidden = false
@@ -180,6 +161,22 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
newRepo.status.SetDevelWorkingName(devel)
newRepo.status.SetUserWorkingName(user)
+ var showBuildB bool = false
+ switch newRepo.status.RepoType() {
+ case "binary":
+ log.Info("compile here. Show()")
+ showBuildB = true
+ case "library":
+ log.Info("library here. Hide()")
+ default:
+ log.Info("unknown. Show()")
+ }
+ if showBuildB {
+ newRepo.endBox.NewButton("build", func() {
+ newRepo.status.Build()
+ })
+ }
+
me.allrepos[path] = newRepo
}
@@ -246,20 +243,20 @@ func repolistWindow() {
}
func showApps() {
- for _, repo := range me.allrepos {
- switch repo.status.RepoType() {
- case "binary":
- log.Info("compile here. Show()")
- repo.Show()
- case "library":
- log.Info("library here. Hide()")
- repo.Hide()
- default:
- log.Info("unknown. Show()")
- repo.Hide()
- }
-
+ for _, repo := range me.allrepos {
+ switch repo.status.RepoType() {
+ case "binary":
+ log.Info("compile here. Show()")
+ repo.Show()
+ case "library":
+ log.Info("library here. Hide()")
+ repo.Hide()
+ default:
+ log.Info("unknown. Show()")
+ repo.Hide()
}
+
+ }
}
func repoAllButtons(box *gui.Node) {
@@ -306,13 +303,7 @@ func repoAllButtons(box *gui.Node) {
me.reposwin.Enable()
})
- box2.NewButton("show apps", func() {
- me.reposwin.Disable()
- showApps()
- me.reposwin.Enable()
- })
-
- box2.NewButton("build all", func() {
+ box2.NewButton("test all builds", func() {
me.reposwin.Disable()
defer me.reposwin.Enable()
showApps()
@@ -334,7 +325,6 @@ func repoAllButtons(box *gui.Node) {
log.Info("every build worked !!!")
log.Info("")
})
-
}
func mergeAllDevelToMain() bool {