more positive verbage
This commit is contained in:
parent
b91313e96c
commit
a6b802d0f4
15
doSmart.go
15
doSmart.go
|
@ -1,8 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -10,19 +8,10 @@ import (
|
||||||
// this will make go.mod and go.sum files, but you have to
|
// this will make go.mod and go.sum files, but you have to
|
||||||
// have the files in .gitignore for now
|
// have the files in .gitignore for now
|
||||||
func doSmart(repo *gitpb.Repo) error {
|
func doSmart(repo *gitpb.Repo) error {
|
||||||
if !repo.IsValidDir() {
|
|
||||||
log.Info(repo.GetGoPath(), "is invalid. fix your repos.pb file with 'forge' first")
|
|
||||||
log.Info("")
|
|
||||||
log.Info("go install go.wit.com/apps/forge@latest")
|
|
||||||
log.Info("")
|
|
||||||
return errors.New(repo.GetGoPath() + " is invalid. fix your repository list with 'forge' first")
|
|
||||||
}
|
|
||||||
log.Info(repo.GetGoPath(), "is valid according to forge")
|
|
||||||
|
|
||||||
// if the repo has go.mod in the repo...
|
// if the repo has go.mod in the repo...
|
||||||
if err := repo.RepoIgnoresGoMod(); err != nil {
|
if err := repo.RepoIgnoresGoMod(); err != nil {
|
||||||
log.Info("never modify go.mod or go.sum for this repo", repo.GetGoPath())
|
log.Info("go-mod-clean can not run on this repo", repo.GetGoPath())
|
||||||
log.Info("We recommend you add 'go.*' to your .gitignore file and store those files as git tag metadata")
|
log.Info("go.mod and go.sum must be git metadata to continue")
|
||||||
repo.ParseGoSum()
|
repo.ParseGoSum()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue