attempting to clean go.* handling again
This commit is contained in:
parent
d473f80919
commit
163484be1f
20
clone.go
20
clone.go
|
@ -105,17 +105,6 @@ func recursiveClone(check *gitpb.Repo) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeValidGoSum(check *gitpb.Repo) error {
|
func makeValidGoSum(check *gitpb.Repo) error {
|
||||||
if check.Exists("go.mod") {
|
|
||||||
log.Info("makeValidGoSum() attempt SetPrimitive()")
|
|
||||||
if err := check.SetPrimitive(); err != nil {
|
|
||||||
log.Info("SetPrimitive() failed", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if check.GoInfo.GoPrimitive {
|
|
||||||
log.Info(check.GetGoPath(), "is a golang primitive! no need to parse go.sum because there is not one!")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
// attempt to grab the notes
|
// attempt to grab the notes
|
||||||
check.Run([]string{"git", "fetch", "origin", "refs/notes/*:refs/notes/*"})
|
check.Run([]string{"git", "fetch", "origin", "refs/notes/*:refs/notes/*"})
|
||||||
|
|
||||||
|
@ -137,15 +126,6 @@ func makeValidGoSum(check *gitpb.Repo) error {
|
||||||
if err := check.RunStrict(cmd); err != nil {
|
if err := check.RunStrict(cmd); err != nil {
|
||||||
log.Info("go mod init failed", err)
|
log.Info("go mod init failed", err)
|
||||||
}
|
}
|
||||||
if check.Exists("go.mod") {
|
|
||||||
if err := check.SetPrimitive(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if check.GoInfo.GoPrimitive {
|
|
||||||
log.Info(check.GetGoPath(), "is a golang primitive! no need to parse go.sum because there is not one!")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if err := check.RunStrict([]string{"go", "mod", "tidy"}); err != nil {
|
if err := check.RunStrict([]string{"go", "mod", "tidy"}); err != nil {
|
||||||
log.Info("go mod tidy failed", err)
|
log.Info("go mod tidy failed", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue