run 'go work use' at the end
This commit is contained in:
parent
daa02ea023
commit
f09d0fbfa9
17
main.go
17
main.go
|
@ -62,8 +62,17 @@ 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()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +80,13 @@ func main() {
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue