This commit is contained in:
Jeff Carr 2025-03-19 07:19:32 -05:00
parent 236a7cb5e8
commit 0662c2e0cb
2 changed files with 4 additions and 43 deletions

View File

@ -21,9 +21,7 @@ func checkDeps(repo *gitpb.Repo) error {
if repo.GoDeps == nil {
return fmt.Errorf("%s has GoDeps == nil", repo.GetGoPath())
}
all := repo.GoDeps.All()
for all.Scan() {
dep := all.Next()
for dep := range repo.GoDeps.IterAll() {
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
// check if the package in question is waiting for another package to publish
@ -31,9 +29,12 @@ func checkDeps(repo *gitpb.Repo) error {
if found == nil {
return fmt.Errorf("%s has dep == nil", repo.GetGoPath(), dep.GoPath)
}
// loop through all the repos that need to be published with new go versions
all := me.found.SortByFullPath()
for all.Scan() {
check := all.Next()
if found.GetGoPath() == check.GetGoPath() {
// this package is waiting on other packages to publish
return fmt.Errorf("%s is waiting on %s", repo.GetGoPath(), found.GetGoPath())

View File

@ -247,22 +247,6 @@ func checkPublishedGodeps(repo *gitpb.Repo) error {
if err := me.forge.TestGoDepsCheckOk(godepsOld, argv.Verbose); err != nil {
return err
}
/*
all := godepsOld.All()
for all.Scan() {
dep := all.Next()
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
// check if the package in question is waiting for another package to publish
found := me.forge.FindByGoPath(dep.GoPath)
if found == nil {
return fmt.Errorf("%s has godep %s which can not be found", repo.GetGoPath(), dep.GoPath)
}
if found.GetLastTag() != dep.Version {
return fmt.Errorf("%s with godep %s version mismatch %s vs %s", repo.GetGoPath(), dep.GoPath, found.GetLastTag(), dep.Version)
}
}
*/
}
godepsNew, err := repo.GoSumFromRepo()
if err != nil {
@ -281,27 +265,3 @@ func checkPublishedGodeps(repo *gitpb.Repo) error {
}
return nil
}
/*
func checkGodeps(repo *gitpb.Repo, godeps *gitpb.GoDeps) error {
if godeps == nil {
}
return nil
all := godeps.All()
for all.Scan() {
dep := all.Next()
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
// check if the package in question is waiting for another package to publish
found := me.forge.FindByGoPath(dep.GoPath)
if found == nil {
return fmt.Errorf("%s has godep %s which can not be found", repo.GetGoPath(), dep.GoPath)
}
if found.GetLastTag() != dep.Version {
return fmt.Errorf("%s with godep %s version mismatch %s vs %s", repo.GetGoPath(), dep.GoPath, found.GetLastTag(), dep.Version)
}
log.Printf("%s with godep %s version match %s vs %s\n", repo.GetGoPath(), dep.GoPath, found.GetLastTag(), dep.Version)
}
return nil
}
*/