diff --git a/doRelease.go b/doRelease.go index 7ebf11a..ba7172b 100644 --- a/doRelease.go +++ b/doRelease.go @@ -52,6 +52,16 @@ func doRelease() bool { log.Info("boo, you didn't git clone", me.current.GetGoPath()) return false } + if alreadyDone(check) { + // means it was already published + // protects against logic errors that might result + // in an infinite loop + log.Info("doRelease() WARNING. should have never gotten here. return true. already done", check.GetGoPath()) + log.Info("doRelease() WARNING. should have never gotten here. return true. already done", check.GetGoPath()) + log.Info("doRelease() WARNING. should have never gotten here. return true. already done", check.GetGoPath()) + log.Sleep(5) + return true + } if !me.forge.FinalGoDepsCheckOk(check, true) { msg := fmt.Sprint("the go.mod file is wrong. fix it here?", check.GetGoPath()) badExit(errors.New(msg)) diff --git a/prepareRelease.go b/prepareRelease.go index dcaa201..015bb79 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -159,11 +159,11 @@ func printDone() { func alreadyDone(repo *gitpb.Repo) bool { for _, gopath := range me.done { - log.Info("WARNING already done", repo.GetGoPath(), gopath) - log.Info("WARNING already done", repo.GetGoPath(), gopath) - log.Info("WARNING already done", repo.GetGoPath(), gopath) + // log.Info("WARNING already done", gopath, repo.GetGoPath()) + // log.Info("WARNING already done", gopath, repo.GetGoPath()) + // log.Info("WARNING already done", gopath, repo.GetGoPath()) if repo.GetGoPath() == gopath { - log.Info("FOUND already done", repo.GetGoPath(), gopath) + log.Info("FOUND. RETURN TRUE. already done", gopath, repo.GetGoPath()) log.Sleep(5) return true }