minor
This commit is contained in:
parent
236a7cb5e8
commit
0662c2e0cb
|
@ -21,9 +21,7 @@ func checkDeps(repo *gitpb.Repo) error {
|
||||||
if repo.GoDeps == nil {
|
if repo.GoDeps == nil {
|
||||||
return fmt.Errorf("%s has GoDeps == nil", repo.GetGoPath())
|
return fmt.Errorf("%s has GoDeps == nil", repo.GetGoPath())
|
||||||
}
|
}
|
||||||
all := repo.GoDeps.All()
|
for dep := range repo.GoDeps.IterAll() {
|
||||||
for all.Scan() {
|
|
||||||
dep := all.Next()
|
|
||||||
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
|
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
|
||||||
|
|
||||||
// check if the package in question is waiting for another package to publish
|
// 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 {
|
if found == nil {
|
||||||
return fmt.Errorf("%s has dep == nil", repo.GetGoPath(), dep.GoPath)
|
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()
|
all := me.found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
check := all.Next()
|
check := all.Next()
|
||||||
|
|
||||||
if found.GetGoPath() == check.GetGoPath() {
|
if found.GetGoPath() == check.GetGoPath() {
|
||||||
// this package is waiting on other packages to publish
|
// this package is waiting on other packages to publish
|
||||||
return fmt.Errorf("%s is waiting on %s", repo.GetGoPath(), found.GetGoPath())
|
return fmt.Errorf("%s is waiting on %s", repo.GetGoPath(), found.GetGoPath())
|
||||||
|
|
|
@ -247,22 +247,6 @@ func checkPublishedGodeps(repo *gitpb.Repo) error {
|
||||||
if err := me.forge.TestGoDepsCheckOk(godepsOld, argv.Verbose); err != nil {
|
if err := me.forge.TestGoDepsCheckOk(godepsOld, argv.Verbose); err != nil {
|
||||||
return err
|
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()
|
godepsNew, err := repo.GoSumFromRepo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -281,27 +265,3 @@ func checkPublishedGodeps(repo *gitpb.Repo) error {
|
||||||
}
|
}
|
||||||
return nil
|
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
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
Loading…
Reference in New Issue