summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-20 01:40:47 -0600
committerJeff Carr <[email protected]>2025-01-20 01:40:47 -0600
commit336ab60e0195cc4e96faa36855dccab563a888ab (patch)
treec5021095031e8f2d2b3f702a54e8d82d9119c974
parent3b17710c1ac4fcebc37d0b27b58c66b27a9ba761 (diff)
need better handling herev0.0.64
-rw-r--r--reloadRepoType.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/reloadRepoType.go b/reloadRepoType.go
index d6dbddb..435b82e 100644
--- a/reloadRepoType.go
+++ b/reloadRepoType.go
@@ -9,6 +9,8 @@ import (
"go.wit.com/log"
)
+// TODO: this needs to be redone in a smarter way
+// to identify which repos have things to build in them
func (repo *Repo) GetRepoType() string {
if repo == nil {
return "nil"
@@ -24,9 +26,6 @@ func (repo *Repo) GetRepoType() string {
if repo.GoInfo.GoPlugin {
return "plugin"
}
- if repo.GoInfo.GoProtobuf {
- return "protobuf"
- }
if repo.GoInfo.GoBinary {
if repo.Exists(".plugin") {
log.Warn("gitpb.RepoType() plugin was not set correctly")
@@ -35,6 +34,10 @@ func (repo *Repo) GetRepoType() string {
}
return "binary"
}
+ // binary should always take precidence over libraries that are protobuf's
+ if repo.GoInfo.GoProtobuf {
+ return "protobuf"
+ }
if repo.GoInfo.GoLibrary {
return "library"
}
@@ -48,11 +51,9 @@ func (repo *Repo) setRepoType() {
}
if repo.Exists(".plugin") {
repo.GoInfo.GoPlugin = true
- return
}
if ok, _, _ := repo.IsProtobuf(); ok {
repo.GoInfo.GoProtobuf = true
- return
}
switch repo.goListRepoType() {
case "binary":