try it all

This commit is contained in:
Jeff Carr 2024-12-01 16:40:22 -06:00
parent 07decc492e
commit f5b8202fda
1 changed files with 19 additions and 20 deletions

View File

@ -36,28 +36,27 @@ func globalDisplayOptions(box *gui.Node) {
loop := me.repos.View.ReposSortByName() loop := me.repos.View.ReposSortByName()
for loop.Scan() { for loop.Scan() {
repo := loop.Repo() repo := loop.Repo()
// if the RepoType is a binary, check if the package dependancies changed, if so, re-publish // check if the package dependancies changed, if so, re-publish
if repo.RepoType() == "binary" { check := me.forge.Repos.FindByGoPath(repo.GoPath())
check := me.forge.Repos.FindByGoPath(repo.GoPath()) if check == nil {
if check == nil { log.Info("boo, you didn't git clone", repo.GoPath())
log.Info("boo, you didn't git clone", repo.GoPath()) os.Exit(-1)
os.Exit(-1) }
} match, err := me.forge.Repos.GoDepsChanged(check)
match, err := me.forge.Repos.GoDepsChanged(check) if err != nil {
if err != nil { log.Info("dependancy checks failed", check.GetGoPath(), err)
log.Info("dependancy checks failed", check.GetGoPath(), err) repo.Status.IncrementRevisionVersion("missing prior published godeps")
repo.Status.IncrementRevisionVersion("missing prior published godeps") continue
continue }
} if match {
if match { log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath())
log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath()) repo.Status.IncrementRevisionVersion("godeps changed")
repo.Status.IncrementRevisionVersion("godeps changed") continue
continue } else {
} else { log.Printf("dependancies have not changed for %s\n", check.GetGoPath())
log.Printf("dependancies have not changed for %s\n", check.GetGoPath())
}
} }
// see if there is a new version
master := repo.Status.GetMasterVersion() master := repo.Status.GetMasterVersion()
lastTag := repo.Status.LastTag() lastTag := repo.Status.LastTag()
if master == lastTag { if master == lastTag {