diff options
| author | Jeff Carr <[email protected]> | 2024-12-03 13:24:41 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-03 13:24:41 -0600 |
| commit | 3600dbed8ceca3253afcd6b6ce1ee3f941aef30d (patch) | |
| tree | 9eda700b2d8efce5bba61558af33b15b919df844 /goDebCheck.go | |
| parent | dfae92e3c35e445e5a8098c720cac9b8d3f969c8 (diff) | |
unbelievable. rill is great.
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 +} |
