summaryrefslogtreecommitdiff
path: root/addRepo.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-22 15:54:36 -0600
committerJeff Carr <[email protected]>2024-02-22 15:54:36 -0600
commit1a3ac687309373257d2bdf4a1119eacf00de6f67 (patch)
treee06c8455b3a1c8d3a936f7efae02662025f15891 /addRepo.go
parentabd6ace49e8129942d83f38d08274f0c9783142d (diff)
only check for build button on a go.wit.com/apps
Diffstat (limited to 'addRepo.go')
-rw-r--r--addRepo.go31
1 files changed, 17 insertions, 14 deletions
diff --git a/addRepo.go b/addRepo.go
index 8242ab0..0f6a2cc 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -2,6 +2,7 @@ package repolist
import (
"errors"
+ "strings"
"go.wit.com/gui"
"go.wit.com/lib/gui/repostatus"
@@ -141,20 +142,22 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
// 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 RepoType", newRepo.Status.RepoType())
- }
- if showBuildB {
- newRepo.endBox.NewButton("build", func() {
- newRepo.Status.Build()
- })
+ if strings.HasPrefix(newRepo.GoPath(), "go.wit.com/apps") {
+ var showBuildB bool = false
+ switch newRepo.Status.RepoType() {
+ case "binary":
+ log.Info("showing compile here button")
+ showBuildB = true
+ case "library":
+ // log.Info("library here. Hide()")
+ default:
+ // log.Info("unknown RepoType", newRepo.Status.RepoType())
+ }
+ if showBuildB {
+ newRepo.endBox.NewButton("build", func() {
+ newRepo.Status.Build()
+ })
+ }
}
case "guireleaser":
newRepo.targetV = newRepo.Status.MirrorTargetVersion()