summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--findNext.go7
-rw-r--r--prepareRelease.go40
2 files changed, 4 insertions, 43 deletions
diff --git a/findNext.go b/findNext.go
index c920fd8..fd35756 100644
--- a/findNext.go
+++ b/findNext.go
@@ -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())
diff --git a/prepareRelease.go b/prepareRelease.go
index 65ac1d8..704e10d 100644
--- a/prepareRelease.go
+++ b/prepareRelease.go
@@ -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
-}
-*/