diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 59 |
1 files changed, 30 insertions, 29 deletions
@@ -31,42 +31,43 @@ func main() { if err != nil { badExit(err) } - - if !argv.NonRecursive { - log.Info("STARTING RECURSIVE CLONE", workingRepo.GetGoPath()) - if err := recursiveClone(workingRepo); err != nil { - badExit(err) + if argv.NonRecursive { + if argv.AutoWork { + autoWork() } - } - autoWork() - if argv.Build { - log.Info("STARTING BUILD", workingRepo.GetGoPath()) - /* - if err := makeValidGoSum(workingRepo); err != nil { - badExit(err) + if argv.Build { + log.Info("STARTING BUILD", workingRepo.GetGoPath()) + /* + if err := makeValidGoSum(workingRepo); err != nil { + badExit(err) + } + if err := build(); err != nil { + badExit(err) + } + */ + if workingRepo.GetRepoType() == "binary" || workingRepo.GetRepoType() == "plugin" { + log.Info("build will probably fail", workingRepo.GetGoPath(), "is", workingRepo.GetRepoType()) } - if err := build(); err != nil { + if err := forge.Build(workingRepo, nil); err != nil { + log.Warn("BUILD FAILED", workingRepo.GetGoPath(), err) badExit(err) } - */ - if workingRepo.GetRepoType() == "binary" || workingRepo.GetRepoType() == "plugin" { - log.Info("build will probably fail", workingRepo.GetGoPath(), "is", workingRepo.GetRepoType()) } - if err := forge.Build(workingRepo, nil); err != nil { - log.Warn("BUILD FAILED", workingRepo.GetGoPath(), err) - badExit(err) + if argv.Install { + log.Info("STARTING INSTALL", workingRepo.GetGoPath()) + // can only install binary or plugin go packages + if workingRepo.GetRepoType() == "binary" || workingRepo.GetRepoType() == "plugin" { + log.Info("install will probably fail", workingRepo.GetGoPath(), "is", workingRepo.GetRepoType()) + } + if err := forge.Install(workingRepo, nil); err != nil { + log.Warn("INSTALL FAILED", workingRepo.GetGoPath(), err) + badExit(err) + } } } - if argv.Install { - log.Info("STARTING INSTALL", workingRepo.GetGoPath()) - // can only install binary or plugin go packages - if workingRepo.GetRepoType() == "binary" || workingRepo.GetRepoType() == "plugin" { - log.Info("install will probably fail", workingRepo.GetGoPath(), "is", workingRepo.GetRepoType()) - } - if err := forge.Install(workingRepo, nil); err != nil { - log.Warn("INSTALL FAILED", workingRepo.GetGoPath(), err) - badExit(err) - } + log.Info("STARTING RECURSIVE CLONE", workingRepo.GetGoPath()) + if err := recursiveClone(workingRepo); err != nil { + badExit(err) } okExit("") } |
