maybe works?

This commit is contained in:
Jeff Carr 2024-12-01 16:17:28 -06:00
parent 8209a5645a
commit 07decc492e
2 changed files with 23 additions and 18 deletions

View File

@ -1,6 +1,8 @@
package main package main
import ( import (
"os"
"go.wit.com/gui" "go.wit.com/gui"
"go.wit.com/lib/debugger" "go.wit.com/lib/debugger"
"go.wit.com/lib/gui/logsettings" "go.wit.com/lib/gui/logsettings"
@ -34,6 +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
if repo.RepoType() == "binary" {
check := me.forge.Repos.FindByGoPath(repo.GoPath())
if check == nil {
log.Info("boo, you didn't git clone", repo.GoPath())
os.Exit(-1)
}
match, err := me.forge.Repos.GoDepsChanged(check)
if err != nil {
log.Info("dependancy checks failed", check.GetGoPath(), err)
repo.Status.IncrementRevisionVersion("missing prior published godeps")
continue
}
if match {
log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath())
repo.Status.IncrementRevisionVersion("godeps changed")
continue
} else {
log.Printf("dependancies have not changed for %s\n", check.GetGoPath())
}
}
master := repo.Status.GetMasterVersion() master := repo.Status.GetMasterVersion()
lastTag := repo.Status.LastTag() lastTag := repo.Status.LastTag()

View File

@ -317,24 +317,6 @@ func findNext() bool {
} }
continue continue
} }
// if the RepoType is a binary, check if the package dependancies changed, if so, re-publish
if repo.RepoType() == "binary" {
check := me.forge.Repos.FindByGoPath(repo.GoPath())
if check == nil {
log.Info("boo, you didn't git clone", repo.GoPath())
os.Exit(-1)
}
match, err := me.forge.Repos.GoDepsChanged(check)
if err != nil {
log.Info("dependancy checks failed", check.GetGoPath(), err)
os.Exit(-1)
}
if match {
log.Printf("dependancy checks indicate a new release is needed for %s\n", check.GetGoPath())
} else {
log.Printf("dependancies have not changed for %s\n", check.GetGoPath())
}
}
log.Info("findNext()", repo.GoPath(), "is not a primative repo") log.Info("findNext()", repo.GoPath(), "is not a primative repo")
if checkValidGoSum(repo) { if checkValidGoSum(repo) {
setCurrentRepo(repo, "should be good to release", "pretty sure") setCurrentRepo(repo, "should be good to release", "pretty sure")