stop using GoSrc()

This commit is contained in:
Jeff Carr 2025-09-11 22:14:41 -05:00
parent d813ade5ab
commit fd2254cd72
4 changed files with 22 additions and 22 deletions

View File

@ -8,11 +8,11 @@ import (
func okExit(thing string) {
log.Info(thing, "ok")
// log.Info("Finished go-clean on", check.GetGoPath(), "ok")
// log.Info("Finished go-clean on", check.GetNamespace(), "ok")
os.Exit(0)
}
func badExit(err error) {
log.Info("forge failed: ", err, me.forge.GetGoSrc())
log.Info("forge failed: ", err, me.forge.Config.ReposDir)
os.Exit(-1)
}

View File

@ -19,15 +19,15 @@ var findOk bool = true
func checkDeps(repo *gitpb.Repo) error {
if repo.GoDeps == nil {
return fmt.Errorf("%s has GoDeps == nil", repo.GetGoPath())
return fmt.Errorf("%s has GoDeps == nil", repo.GetNamespace())
}
for dep := range repo.GoDeps.IterAll() {
// log.Info(repo.GetGoPath(), dep.GoPath, dep.Version)
// log.Info(repo.GetNamespace(), 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 dep == nil", repo.GetGoPath(), dep.GoPath)
return fmt.Errorf("%s has dep == nil", repo.GetNamespace(), dep.GoPath)
}
// loop through all the repos that need to be published with new go versions
@ -35,9 +35,9 @@ func checkDeps(repo *gitpb.Repo) error {
for all.Scan() {
check := all.Next()
if found.GetGoPath() == check.GetGoPath() {
if found.GetNamespace() == check.GetNamespace() {
// 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.GetNamespace(), found.GetNamespace())
}
}
// found package isn't being published. is the version correct?
@ -46,7 +46,7 @@ func checkDeps(repo *gitpb.Repo) error {
if found.GetLastTag() == dep.Version {
// everything is normal
} else {
return fmt.Errorf("%s version mismatch on %s (%s vs %s)", repo.GetGoPath(), found.GetGoPath(), found.GetLastTag(), dep.Version)
return fmt.Errorf("%s version mismatch on %s (%s vs %s)", repo.GetNamespace(), found.GetNamespace(), found.GetLastTag(), dep.Version)
}
*/
}
@ -63,21 +63,21 @@ func findNext() bool {
for all.Scan() {
check := all.Next()
if check.GetMasterBranchName() != check.GetCurrentBranchName() {
log.Info("YOU MUST BE ON THE MASTER BRANCH", check.GetGoPath())
log.Info("YOU MUST BE ON THE MASTER BRANCH", check.GetNamespace())
continue
}
if check.IsDirty() {
log.Info("CAN NOT RELEASE DIRTY REPO", check.GetGoPath())
log.Info("CAN NOT RELEASE DIRTY REPO", check.GetNamespace())
continue
}
if alreadyDone(check) {
log.Info("findNext() alreadyDone. WHY IS THIS STILL CHECKING?", check.GetGoPath())
log.Info("findNext() alreadyDone. WHY IS THIS STILL CHECKING?", check.GetNamespace())
continue
}
log.Info("CHECKING START:", check.GetGoPath())
log.Info("CHECKING START:", check.GetNamespace())
if me.forge.Config.IsPrivate(check.GetGoPath()) {
log.Info("GOOD TO GO ON PRIVATE REPO", check.GetGoPath())
if me.forge.Config.IsPrivate(check.GetNamespace()) {
log.Info("GOOD TO GO ON PRIVATE REPO", check.GetNamespace())
setCurrentRepo(check, "should be good to release", "pretty sure")
return true
}
@ -107,12 +107,12 @@ func findNext() bool {
if err := me.forge.FinalGoDepsCheckOk(check, argv.Verbose); err != nil {
// if err := me.forge.FinalGoDepsCheckOk(check, false); err != nil {
log.Info("FinalGoDepsCheckOk() repo=", check.GetGoPath(), "err:", err)
log.Info("CHECKING END:", check.GetGoPath())
log.Info("FinalGoDepsCheckOk() repo=", check.GetNamespace(), "err:", err)
log.Info("CHECKING END:", check.GetNamespace())
log.Info("")
continue
}
log.Info("GOOD TO GO ON", check.GetGoPath())
log.Info("GOOD TO GO ON", check.GetNamespace())
setCurrentRepo(check, "should be good to release", "pretty sure")
return true
}
@ -151,7 +151,7 @@ func setCurrentRepo(check *gitpb.Repo, s string, note string) bool {
me.release.releaseVersionB.SetText("nope")
me.release.version.SetText("badver")
} else {
me.release.repo.SetText(check.GetGoPath())
me.release.repo.SetText(check.GetNamespace())
me.release.version.SetText(check.GetTargetVersion())
me.release.releaseVersionB.SetText("release version " + check.GetTargetVersion())
me.release.version.SetText(check.GetTargetVersion())
@ -170,12 +170,12 @@ func testGoDepsCheckOk(godeps *gitpb.GoDeps, verbose bool) error {
all := godeps.SortByGoPath()
for all.Scan() {
depRepo := all.Next()
fullpath := filepath.Join(me.forge.GetGoSrc(), depRepo.GetGoPath())
fullpath := filepath.Join(me.forge.Config.ReposDir, depRepo.GoPath)
found := me.found.FindByFullPath(fullpath)
if found == nil {
continue
}
return fmt.Errorf("dep is being upgraded %s", depRepo.GetGoPath())
return fmt.Errorf("dep is being upgraded %s", depRepo.GoPath)
}
return nil
}

View File

@ -38,7 +38,7 @@ func main() {
fhelp.CheckGoModCleanExit()
// me.forge.ConfigPrintTable()
os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())
os.Setenv("REPO_WORK_PATH", me.forge.Config.ReposDir)
// save the ENV var here
me.releaseReasonS = os.Getenv("GUIRELEASE_REASON")

View File

@ -112,7 +112,7 @@ func createReleaseBox(box *gui.Node) {
me.release.grid.NextRow()
// me.userHomePwd.SetText(homeDir)
me.goSrcPwd.SetText(me.forge.GetGoSrc())
me.goSrcPwd.SetText(me.forge.Config.ReposDir)
group := me.release.box.NewGroup("Run on Current Repo")
grid := group.NewGrid("buildOptions", 0, 0)