diff options
| author | Jeff Carr <[email protected]> | 2024-12-15 15:52:46 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-15 15:52:46 -0600 |
| commit | a31f675e1228907786e90ffd0235eb10c42cd833 (patch) | |
| tree | bc3f4810f9627130faa0fe6f6c537803c279743d /clone.go | |
| parent | e3608b784e5e89e7501fb310d3b4e13ac6ef41ae (diff) | |
still trying to perfect this. todo: make gitpb perfectv0.0.33
Diffstat (limited to 'clone.go')
| -rw-r--r-- | clone.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -133,6 +133,20 @@ func (f *Forge) finishClone(gopath string, giturl string) (*gitpb.Repo, error) { log.Warn("forge.Clone() url changed", newr.URL, "to", giturl) newr.URL = giturl } + if err := newr.RepoIgnoresGoMod(); err != nil { + log.Info("never modify go.mod or go.sum for this repo", newr.GoPath) + log.Info("We recommend you add 'go.*' to your .gitignore file and store those files as git tag metadata") + newr.ParseGoSum() + return newr, nil + } + + if newr.Exists("go.mod") { + return newr, nil + } + + log.Info("todo: something went wrong probably. didn't finish. run go-mod-clean? (can't here. loop of circles)") + log.Info("todo: do go mod init here directly") + log.Info("todo: try to run go mod init here", newr.GoPath) return newr, nil } |
