diff options
| author | Jeff Carr <[email protected]> | 2025-10-22 16:32:28 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-22 16:32:28 -0500 |
| commit | a2d6aac9f22bfe1060930e756a7dff86b3918f7e (patch) | |
| tree | a2c95d61c9d1e47a321e773857aebffdd6244474 | |
| parent | 8535f407ac1e317df9d9bb34dbef7194b23eea1e (diff) | |
wrong logic in func. need to redo this whole thing.v0.0.188
| -rw-r--r-- | build.go | 2 | ||||
| -rw-r--r-- | cleanGoSum.go | 6 | ||||
| -rw-r--r-- | finalGoSumCheck.go | 8 | ||||
| -rw-r--r-- | repoNew.go | 10 |
4 files changed, 8 insertions, 18 deletions
@@ -62,7 +62,7 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err all := repo.GoDeps.SortByGoPath() for all.Scan() { t := all.Next() - found := f.FindByNamespace(t.GetGoPath()) + found := f.Repos.FindByNamespace(t.GetGoPath()) if found.GetRepoType() == "protobuf" { if err := f.runAutogenpb(found); err != nil { return err diff --git a/cleanGoSum.go b/cleanGoSum.go index 61f6036..d98fb56 100644 --- a/cleanGoSum.go +++ b/cleanGoSum.go @@ -28,7 +28,7 @@ func (f *Forge) CleanGoDepsCheckOk(check *gitpb.Repo) error { all := check.GoDeps.SortByGoPath() for all.Scan() { depRepo := all.Next() - found := f.FindByNamespace(depRepo.GetGoPath()) + found := f.Repos.FindByNamespace(depRepo.GetGoPath()) if found == nil { if f.CheckOverride(depRepo.GetGoPath()) { // skip this gopath because it's probably broken forever @@ -40,7 +40,7 @@ func (f *Forge) CleanGoDepsCheckOk(check *gitpb.Repo) error { } // log.Info("found dep", depRepo.GetGoPath()) if depRepo.GetVersion() != found.GetMasterVersion() { - check := f.FindByNamespace(depRepo.GetGoPath()) + check := f.Repos.FindByNamespace(depRepo.GetGoPath()) var ends string if check.CheckDirty() { ends = "(dirty) " @@ -154,7 +154,7 @@ func (f *Forge) TrimGoSum(check *gitpb.Repo) error { if good[gopath] { fmt.Fprintf(newf, "%s %s\n", gopath, stuff[gopath]) fmt.Fprintf(newf, "%s %s\n", gopath, modver[gopath]) - check := f.FindByNamespace(gopath) + check := f.Repos.FindByNamespace(gopath) if check == nil { log.Info("gopath does not really exist:", gopath) } diff --git a/finalGoSumCheck.go b/finalGoSumCheck.go index 1935028..daee477 100644 --- a/finalGoSumCheck.go +++ b/finalGoSumCheck.go @@ -36,7 +36,7 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) error { deps := check.GoDeps.SortByGoPath() for deps.Scan() { depRepo := deps.Next() - found := f.FindByNamespace(depRepo.GetGoPath()) + found := f.Repos.FindByNamespace(depRepo.GetGoPath()) if found == nil { if f.CheckOverride(depRepo.GetGoPath()) { // skip this gopath because it's probably broken forever @@ -50,7 +50,7 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) error { } // log.Info("found dep", depRepo.GetGoPath()) if depRepo.GetVersion() != found.GetTargetVersion() { - check := f.FindByNamespace(depRepo.GetGoPath()) + check := f.Repos.FindByNamespace(depRepo.GetGoPath()) if f.Config.IsReadOnly(check.GetGoPath()) { if ENV.Verbose() { log.Printf("%-48s ok error .%s. vs .%s. (ignoring read-only repo)\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion()) @@ -124,7 +124,7 @@ func (f *Forge) TestGoDepsCheckOk(godeps *gitpb.GoDeps) error { all := godeps.SortByGoPath() for all.Scan() { depRepo := all.Next() - found := f.FindByNamespace(depRepo.GetGoPath()) + found := f.Repos.FindByNamespace(depRepo.GetGoPath()) if found == nil { if f.CheckOverride(depRepo.GetGoPath()) { // skip this gopath because it's probably broken forever @@ -138,7 +138,7 @@ func (f *Forge) TestGoDepsCheckOk(godeps *gitpb.GoDeps) error { } // log.Info("found dep", depRepo.GetGoPath()) if depRepo.GetVersion() != found.GetTargetVersion() { - check := f.FindByNamespace(depRepo.GetGoPath()) + check := f.Repos.FindByNamespace(depRepo.GetGoPath()) if f.Config.IsReadOnly(check.GetGoPath()) { if ENV.Verbose() { log.Printf("%-48s ok error .%s. vs .%s. (ignoring read-only repo)\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion()) @@ -225,16 +225,6 @@ func (f *Forge) AddFullPath(fulldir string) *gitpb.Repo { return nil } -// deprecate -// func (f *Forge) FindByGoPath(gopath string) *gitpb.Repo { -// return f.FindByNamespace(gopath) -// } - -func (f *Forge) FindByNamespace(gopath string) *gitpb.Repo { - fullpath := filepath.Join(ENV.Get("ReposDir"), gopath) - return f.Repos.FindByFullPath(fullpath) -} - // tries any parent func (f *Forge) FindAnyPath(dir string) *gitpb.Repo { dir = filepath.Clean(dir) |
