diff options
| author | Jeff Carr <[email protected]> | 2025-02-08 06:32:59 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-08 06:32:59 -0600 |
| commit | 018772dbfb7ca9826123e0ba64dd87badad5848e (patch) | |
| tree | 69d4b941d3618dd6543665d79e565f8ce8f393f2 /finalGoSumCheck.go | |
| parent | 9baa477990a8b6555e1a70c09a5411e80e344334 (diff) | |
more things to check if release is neededv0.0.73
Diffstat (limited to 'finalGoSumCheck.go')
| -rw-r--r-- | finalGoSumCheck.go | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/finalGoSumCheck.go b/finalGoSumCheck.go index d10b047..4a46c62 100644 --- a/finalGoSumCheck.go +++ b/finalGoSumCheck.go @@ -108,3 +108,44 @@ func (f *Forge) CheckOverride(gopath string) bool { } return false } + +func (f *Forge) TestGoDepsCheckOk(godeps *gitpb.GoDeps, verbose bool) error { + all := godeps.SortByGoPath() + for all.Scan() { + depRepo := all.Next() + found := f.FindByGoPath(depRepo.GetGoPath()) + if found == nil { + if f.CheckOverride(depRepo.GetGoPath()) { + // skip this gopath because it's probably broken forever + continue + } + return fmt.Errorf("dep not found: %s", depRepo.GetGoPath()) + } + if depRepo.GetVersion() == found.GetMasterVersion() { + // log.Printf("%-48s error ?? %-10s vs %-10s\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) + continue + } + // log.Info("found dep", depRepo.GetGoPath()) + if depRepo.GetVersion() != found.GetTargetVersion() { + check := f.FindByGoPath(depRepo.GetGoPath()) + if f.Config.IsReadOnly(check.GetGoPath()) { + if verbose { + log.Printf("%-48s ok error .%s. vs .%s. (ignoring read-only repo)\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion()) + } + } else { + if f.CheckOverride(depRepo.GetGoPath()) { + if verbose { + log.Printf("%-48s ok error .%s. vs .%s. (forge.CheckOverride())\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion()) + } + // skip this gopath because it's probably broken forever + continue + } else { + // log.Printf("%-48s error ?? %-10s vs %-10s\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) + // log.Printf("%-48s error %10s vs %10s\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion()) + return fmt.Errorf("%-48s error %10s vs %10s", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetMasterVersion()) + } + } + } + } + return nil +} |
