diff options
Diffstat (limited to 'goDebCheck.go')
| -rw-r--r-- | goDebCheck.go | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/goDebCheck.go b/goDebCheck.go index 793397f..f5e11e7 100644 --- a/goDebCheck.go +++ b/goDebCheck.go @@ -1,6 +1,8 @@ package forgepb import ( + "strings" + "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -20,7 +22,7 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool { } // clear out the protobuf and rescan from the file check.GoDeps = nil - if ok, err := check.ParseGoSum(); ! ok { + if ok, err := check.ParseGoSum(); !ok { log.Info("FinalGoDepsCheckOk() error", err) return false } @@ -37,18 +39,42 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool { depRepo := deps.Next() found := f.Repos.FindByGoPath(depRepo.GetGoPath()) if found == nil { + if f.checkOverride(depRepo.GetGoPath()) { + // skip this gopath because it's probably broken forever + continue + } log.Info("not found:", depRepo.GetGoPath()) - return false + good = false + continue } // log.Info("found dep", depRepo.GetGoPath()) if depRepo.GetVersion() != found.GetTargetVersion() { - if f.IsReadOnly(depRepo.GetGoPath()) { + check := f.Repos.FindByGoPath(depRepo.GoPath) + if f.IsReadOnly(check) { log.Printf("%-48s ok error %10s vs %10s (ignoring read-only repo)", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) } else { - log.Printf("%-48s error %10s vs %10s", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) - good = false + if f.checkOverride(depRepo.GetGoPath()) { + log.Printf("%-48s ok error %10s vs %10s (forge.checkOverride())", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) + // skip this gopath because it's probably broken forever + continue + } else { + log.Printf("%-48s error %10s vs %10s", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) + good = false + } } } } return good } + +func (f *Forge) checkOverride(gopath string) bool { + if gopath == "cloud.google.com/go" { + log.Info("checkOverride() is ignoring", gopath) + return false + } + if strings.HasPrefix(gopath, "github.com/go-gl") { + log.Info("checkOverride() is ignoring", gopath) + return false + } + return false +} |
