diff options
Diffstat (limited to 'findNext.go')
| -rw-r--r-- | findNext.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/findNext.go b/findNext.go index a586c96..67e1759 100644 --- a/findNext.go +++ b/findNext.go @@ -3,6 +3,7 @@ package main import ( "fmt" + "path/filepath" "go.wit.com/log" @@ -71,6 +72,16 @@ func findNext() bool { } log.Info("CHECKING START:", check.GetGoPath()) + godepsNew, err := check.GoSumFromRepo() + if err != nil { + log.Info("CHECKING go deps from repo failed", err) + continue + + } + if err := testGoDepsCheckOk(godepsNew, argv.Verbose); err != nil { + log.Info("CHECKING current repo deps failed", err) + continue + } /* findCounter += 1 if !check.ParseGoSum() { @@ -186,3 +197,17 @@ func setCurrentRepo(check *gitpb.Repo, s string, note string) bool { return true } + +func testGoDepsCheckOk(godeps *gitpb.GoDeps, verbose bool) error { + all := godeps.SortByGoPath() + for all.Scan() { + depRepo := all.Next() + fullpath := filepath.Join(me.forge.GetGoSrc(), depRepo.GetGoPath()) + found := me.found.FindByFullPath(fullpath) + if found == nil { + continue + } + return fmt.Errorf("dep is being upgraded %s", depRepo.GetGoPath()) + } + return nil +} |
