fix recursive logic
This commit is contained in:
parent
c23cc60000
commit
b5d3072729
16
main.go
16
main.go
|
@ -61,6 +61,9 @@ func main() {
|
|||
if argv.Recursive || argv.Pull || argv.RedoGoMod {
|
||||
log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
|
||||
// there is more to do
|
||||
log.Info("argv.Recursive is", argv.Recursive)
|
||||
log.Info("argv.Pull is", argv.Pull)
|
||||
log.Info("argv.RedoGoMod is", argv.RedoGoMod)
|
||||
log.Info("onward and upward")
|
||||
} else {
|
||||
log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
|
||||
|
@ -84,6 +87,17 @@ func main() {
|
|||
log.Info("could not download:", err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
if argv.Recursive || argv.Pull || argv.RedoGoMod {
|
||||
log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
|
||||
// there is more to do
|
||||
log.Info("argv.Recursive is", argv.Recursive)
|
||||
log.Info("argv.Pull is", argv.Pull)
|
||||
log.Info("argv.RedoGoMod is", argv.RedoGoMod)
|
||||
log.Info("onward and upward")
|
||||
} else {
|
||||
log.Info("repo cloned worked to", filepath.Join(wdir, argv.Repo))
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// update go.sum and go.mod
|
||||
// todo: only do this if they don't exist?
|
||||
|
@ -98,6 +112,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
os.Setenv("REPO_AUTO_CLONE", "false")
|
||||
// look recursively in your working directory for git repos
|
||||
totalcount := scanForRepos(wdir)
|
||||
|
||||
|
@ -134,6 +149,7 @@ func main() {
|
|||
log.Info("how did this repo still not exist?", argv.Repo)
|
||||
os.Exit(-1)
|
||||
}
|
||||
os.Setenv("REPO_AUTO_CLONE", "true")
|
||||
godep := newr.Status.GetGoDeps()
|
||||
for gopath, version := range godep {
|
||||
repo, err := rv.NewRepo(gopath)
|
||||
|
|
Loading…
Reference in New Issue