diff options
| author | Jeff Carr <[email protected]> | 2024-03-09 22:00:10 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-03-09 22:00:10 -0600 |
| commit | f09d0fbfa9a9ffb037943fecdab13f0e53212850 (patch) | |
| tree | a2aefbf4f5d07c8bfc6d006c5e8c2289255fef51 /main.go | |
| parent | daa02ea02370521a92082b94771679992eb1ffc8 (diff) | |
run 'go work use' at the endv0.0.6
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -62,16 +62,31 @@ func main() { godep := newr.Status.GetGoDeps() for gopath, version := range godep { - if _, err := rv.NewRepo(gopath); err != nil { + repo, err := rv.NewRepo(gopath) + if err != nil { log.Info("git clone failed for", gopath, version) + continue + } + repo.Status.MakeRedomod() + } + + for _, repo := range rv.AllRepos() { + if ! repo.Status.Exists("go.mod") { + repo.Status.MakeRedomod() } } log.Info("all repositories are cloned") - if ! myargs.NoWork { - log.Info("Creating", wdir + "/go.work") + if !myargs.NoWork { + log.Info("Creating", wdir+"/go.work") rv.MakeGoWork() + shell.RunPath(wdir, []string{"go", "work", "use"}) } + + for _, repo := range rv.AllRepos() { + log.Info("found repo", repo.GoPath(), repo.Status.Path()) + } + } // look for or make a go.work file |
