summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/clone.go b/clone.go
index 3d308a7..7fb8a2a 100644
--- a/clone.go
+++ b/clone.go
@@ -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
}