fix output formatting errors
This commit is contained in:
parent
a29e10e911
commit
1eeab58670
|
@ -50,20 +50,20 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error {
|
||||||
if forge.Config.IsReadOnly(check.GetGoPath()) {
|
if forge.Config.IsReadOnly(check.GetGoPath()) {
|
||||||
ends += "(ignoring read-only) "
|
ends += "(ignoring read-only) "
|
||||||
if argv.Verbose {
|
if argv.Verbose {
|
||||||
log.Printf("%-48s ok error .%s. vs .%s. %s", depRepo.GetGoPath(),
|
log.Printf("%-48s ok error .%s. vs .%s. %s\n", depRepo.GetGoPath(),
|
||||||
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if forge.CheckOverride(depRepo.GetGoPath()) {
|
if forge.CheckOverride(depRepo.GetGoPath()) {
|
||||||
ends += "(override) "
|
ends += "(override) "
|
||||||
if argv.Verbose {
|
if argv.Verbose {
|
||||||
log.Printf("%-48s ok error .%s. vs .%s. %s", depRepo.GetGoPath(),
|
log.Printf("%-48s ok error .%s. vs .%s. %s\n", depRepo.GetGoPath(),
|
||||||
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
||||||
// 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 %s", depRepo.GetGoPath(),
|
log.Printf("%-48s error %10s vs %10s %s\n", depRepo.GetGoPath(),
|
||||||
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
||||||
errs := fmt.Sprintf("%s error %s vs %s %s", depRepo.GetGoPath(),
|
errs := fmt.Sprintf("%s error %s vs %s %s", depRepo.GetGoPath(),
|
||||||
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
depRepo.GetVersion(), found.GetMasterVersion(), ends)
|
||||||
|
|
39
doStrict.go
39
doStrict.go
|
@ -38,8 +38,8 @@ func doStrict(repo *gitpb.Repo) error {
|
||||||
return errors.New(repo.GetGoPath() + " not in the git master branch")
|
return errors.New(repo.GetGoPath() + " not in the git master branch")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = repo.RepoIgnoresGoMod()
|
// not sure if this really needs to be run a second time. probably not, but whatever. who cares
|
||||||
if err != nil {
|
if err := repo.RepoIgnoresGoMod(); err != nil {
|
||||||
log.Info(repo.GetGoPath(), "some wierd git error happened. investigate.", err)
|
log.Info(repo.GetGoPath(), "some wierd git error happened. investigate.", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -91,14 +91,16 @@ func doStrict(repo *gitpb.Repo) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// the first time, it'll attempt to fix some stuff
|
// the first time, it'll attempt to fix some stuff
|
||||||
log.Info("Running: updateToNewestReleases()")
|
log.Info(repo.GetGoPath(), "Running: updateToNewestReleases()")
|
||||||
cleanGoDepsCheckOk(repo)
|
cleanGoDepsCheckOk(repo)
|
||||||
|
|
||||||
// try to trim junk
|
if repo.Exists("go.sum") {
|
||||||
log.Info("Running: trimGoSum()")
|
// try to trim junk
|
||||||
if err := trimGoSum(repo); err != nil {
|
log.Info(repo.GetGoPath(), "Running: trimGoSum()")
|
||||||
log.Info(repo.GetGoPath(), "trimGoSum() failed", err)
|
if err := trimGoSum(repo); err != nil {
|
||||||
return err
|
log.Info(repo.GetGoPath(), "trimGoSum() failed", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.ParseGoSum() {
|
if repo.ParseGoSum() {
|
||||||
|
@ -107,17 +109,28 @@ func doStrict(repo *gitpb.Repo) error {
|
||||||
log.Info(repo.GetGoPath(), "ParseGoSum() failed")
|
log.Info(repo.GetGoPath(), "ParseGoSum() failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
// check go.sum file
|
if !repo.GetGoPrimitive() {
|
||||||
if err := cleanGoDepsCheckOk(repo); err != nil {
|
// check go.sum file
|
||||||
log.Info("forge.FinalGoDepsCheck() failed. boo. :", repo.GetGoPath())
|
if err := cleanGoDepsCheckOk(repo); err != nil {
|
||||||
return err
|
log.Info(repo.GetGoPath(), "forge.FinalGoDepsCheck() failed. boo.")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if repo.Exists("go.sum") {
|
||||||
|
// try to trim junk
|
||||||
|
log.Info(repo.GetGoPath(), "Running: trimGoSum()")
|
||||||
|
if err := trimGoSum(repo); err != nil {
|
||||||
|
log.Info(repo.GetGoPath(), "trimGoSum() failed", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// put the files in the notes section in git
|
// put the files in the notes section in git
|
||||||
// this way, git commits are not messed up
|
// this way, git commits are not messed up
|
||||||
// with this autogenerated code
|
// with this autogenerated code
|
||||||
if err := saveAsMetadata(repo); err != nil {
|
if err := saveAsMetadata(repo); err != nil {
|
||||||
log.Info("save go.mod as git metadata failed", repo.GetGoPath(), err)
|
log.Info(repo.GetGoPath(), "save go.mod as git metadata failed", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue