summaryrefslogtreecommitdiff
path: root/finalGoDepsCheckOk.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-30 14:03:03 -0500
committerJeff Carr <[email protected]>2025-10-30 14:03:03 -0500
commit7787400035d2e764caac766dc75111e1683e5537 (patch)
tree9153d01ffd3cb63011867512991d19e078a0aa3e /finalGoDepsCheckOk.go
parentcc1a5a7acfd0360c49f5710f0d90765f8bad9f8a (diff)
try fixing publish
Diffstat (limited to 'finalGoDepsCheckOk.go')
-rw-r--r--finalGoDepsCheckOk.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/finalGoDepsCheckOk.go b/finalGoDepsCheckOk.go
new file mode 100644
index 0000000..f492a32
--- /dev/null
+++ b/finalGoDepsCheckOk.go
@@ -0,0 +1,37 @@
+package main
+
+import (
+ "errors"
+ "fmt"
+ "path/filepath"
+
+ "go.wit.com/lib/env"
+ "go.wit.com/lib/protobuf/gitpb"
+)
+
+func finalGoDepsCheckOk(check *gitpb.Repo) error {
+ err := me.forge.FinalGoDepsCheckOk(check)
+ if err == nil {
+ // log.Info("FINDNEXT: forge.FinalGoDepsCheck(check) worked!")
+ return nil
+ }
+ // log.Printf("FINDNEXT: forge.FinalGoDepsCheck(check) err (%v)\n", err)
+ return err
+}
+
+func testGoDepsCheckOk(godeps *gitpb.GoDeps) error {
+ if godeps == nil {
+ return errors.New("testGoDepsCheckOk() godeps == nil")
+ }
+ all := godeps.SortByGoPath()
+ for all.Scan() {
+ depRepo := all.Next()
+ fullpath := filepath.Join(env.Get("gopath"), depRepo.GoPath)
+ found := me.forge.Repos.FindByFullPath(fullpath)
+ if found == nil {
+ continue
+ }
+ return fmt.Errorf("testGoDepsCheckOk() dep is being upgraded %s", depRepo.GoPath)
+ }
+ return nil
+}