more things to check if release is needed
This commit is contained in:
parent
9baa477990
commit
018772dbfb
|
@ -108,3 +108,44 @@ func (f *Forge) CheckOverride(gopath string) bool {
|
||||||
}
|
}
|
||||||
return false
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue