summaryrefslogtreecommitdiff
path: root/finalGoSumCheck.go
diff options
context:
space:
mode:
Diffstat (limited to 'finalGoSumCheck.go')
-rw-r--r--finalGoSumCheck.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/finalGoSumCheck.go b/finalGoSumCheck.go
index f32f905..81d6ead 100644
--- a/finalGoSumCheck.go
+++ b/finalGoSumCheck.go
@@ -16,7 +16,7 @@ import (
// it re-scans the go.sum file. DOES NOT MODIFY ANYTHING
// this is the last thing to run to double check everything
// before 'git tag' or git push --tags
-func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
+func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo, verbose bool) bool {
var good bool = true
if check == nil {
log.Info("boo, check == nil")
@@ -33,7 +33,6 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
return true
}
- log.Printf("current repo %s go dependancy count: %d", check.GetGoPath(), check.GoDepsLen())
deps := check.GoDeps.SortByGoPath()
for deps.Scan() {
depRepo := deps.Next()
@@ -51,19 +50,26 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
if depRepo.GetVersion() != found.GetTargetVersion() {
check := f.FindByGoPath(depRepo.GetGoPath())
if f.Config.IsReadOnly(check.GetGoPath()) {
- log.Printf("%-48s ok error .%s. vs .%s. (ignoring read-only repo)", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
+ if verbose {
+ log.Printf("%-48s ok error .%s. vs .%s. (ignoring read-only repo)\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
+ }
} else {
if f.CheckOverride(depRepo.GetGoPath()) {
- log.Printf("%-48s ok error .%s. vs .%s. (forge.CheckOverride())", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
+ if verbose {
+ log.Printf("%-48s ok error .%s. vs .%s. (forge.CheckOverride())\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
+ }
// skip this gopath because it's probably broken forever
continue
} else {
- log.Printf("%-48s error %10s vs %10s", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
+ log.Printf("%-48s error %10s vs %10s\n", depRepo.GetGoPath(), depRepo.GetVersion(), found.GetTargetVersion())
good = false
}
}
}
}
+ if good {
+ log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen())
+ }
return good
}