diff options
| author | Jeff Carr <[email protected]> | 2025-10-03 10:02:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-03 10:02:48 -0500 |
| commit | 65fcf74c9a47cadc755f1965daee198031415c89 (patch) | |
| tree | 40822e0a259e071a2155f72dfd9d0f49373ca712 | |
| parent | ca419f8db029fe494d27e2d531a85436db05d665 (diff) | |
fix non-recursive clone
| -rw-r--r-- | clone.go | 4 | ||||
| -rw-r--r-- | main.go | 59 |
2 files changed, 34 insertions, 29 deletions
@@ -80,6 +80,10 @@ func clone(gopath string) (*gitpb.Repo, error) { log.Info("clone() could not download err:", err) return nil, err } + if argv.NonRecursive { + // clone and nothing else + return pb, nil + } autoWork() if err := makeValidGoSum(pb); err != nil { @@ -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("") } |
