less aoutput
This commit is contained in:
parent
0f232fe342
commit
8d275ff054
|
@ -16,7 +16,7 @@ import (
|
||||||
// it re-scans the go.sum file. DOES NOT MODIFY ANYTHING
|
// it re-scans the go.sum file. DOES NOT MODIFY ANYTHING
|
||||||
// this is the last thing to run to double check everything
|
// this is the last thing to run to double check everything
|
||||||
// before 'git tag' or git push --tags
|
// 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
|
var good bool = true
|
||||||
if check == nil {
|
if check == nil {
|
||||||
log.Info("boo, check == nil")
|
log.Info("boo, check == nil")
|
||||||
|
@ -33,7 +33,6 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("current repo %s go dependancy count: %d", check.GetGoPath(), check.GoDepsLen())
|
|
||||||
deps := check.GoDeps.SortByGoPath()
|
deps := check.GoDeps.SortByGoPath()
|
||||||
for deps.Scan() {
|
for deps.Scan() {
|
||||||
depRepo := deps.Next()
|
depRepo := deps.Next()
|
||||||
|
@ -51,19 +50,26 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
|
||||||
if depRepo.GetVersion() != found.GetTargetVersion() {
|
if depRepo.GetVersion() != found.GetTargetVersion() {
|
||||||
check := f.FindByGoPath(depRepo.GetGoPath())
|
check := f.FindByGoPath(depRepo.GetGoPath())
|
||||||
if f.Config.IsReadOnly(check.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 {
|
} else {
|
||||||
if f.CheckOverride(depRepo.GetGoPath()) {
|
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
|
// skip this gopath because it's probably broken forever
|
||||||
continue
|
continue
|
||||||
} else {
|
} 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
|
good = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if good {
|
||||||
|
log.Printf("current repo %s go dependancy count: %d\n", check.GetGoPath(), check.GoDepsLen())
|
||||||
|
}
|
||||||
return good
|
return good
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ func (f *Forge) testGoRepo(check *gitpb.Repo) {
|
||||||
data, _ := os.ReadFile(filepath.Join(check.FullPath, "go.mod"))
|
data, _ := os.ReadFile(filepath.Join(check.FullPath, "go.mod"))
|
||||||
log.Info(string(data))
|
log.Info(string(data))
|
||||||
|
|
||||||
if f.FinalGoDepsCheckOk(check) {
|
if f.FinalGoDepsCheckOk(check, true) {
|
||||||
log.Info("forge.FinalGoDepsCheck(check) worked!")
|
log.Info("forge.FinalGoDepsCheck(check) worked!")
|
||||||
} else {
|
} else {
|
||||||
log.Info("forge.FinalGoDepsCheck(check) failed. boo.")
|
log.Info("forge.FinalGoDepsCheck(check) failed. boo.")
|
||||||
|
|
Loading…
Reference in New Issue