diff options
| author | Jeff Carr <[email protected]> | 2024-01-26 11:59:59 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-26 11:59:59 -0600 |
| commit | 1a459d6f6ff8ed77f41bba1cceea92035415aa0b (patch) | |
| tree | 209e012acba80a0397d5c7be181e85bbb0241df4 /scan.go | |
| parent | 615947a05a5fd291f4e43da11eeb50fcd3eaa597 (diff) | |
closer to release automation
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'scan.go')
| -rw-r--r-- | scan.go | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -63,20 +63,6 @@ func (r *repo) newScan() bool { return false } -func (r *repo) getStatus() string { - if r.status.CheckDirty() { - log.Warn("CheckDirty() true") - return "dirty" - } - - if r.status.CheckBranches() { - log.Warn("Branches are Perfect") - return "PERFECT" - } - log.Warn("Branches are not Perfect") - return "merge" -} - func (r *repo) getGoSumStatus() string { return r.goSumStatus.String() } @@ -86,10 +72,20 @@ func (r *repo) setGoSumStatus(s string) { r.status.SetGoSumStatus(s) } +func (r *repo) checkDirty() bool { + if r.status.CheckDirty() { + log.Info("dirty repo:", r.status.String(), r.getGoSumStatus()) + r.setGoSumStatus("DIRTY") + return true + } + return false +} + func (r *repo) checkSafeGoSumRemake() { if ok, bad := r.status.CheckSafeGoSumRemake(); ok { log.Info("checkSafeGoSumRemake() is safe to redo") r.setGoSumStatus("SAFE") + r.status.MakeRedomod() } else { log.Info("checkSafeGoSumRemake() is not safe. problems:", bad) r.setGoSumStatus("BAD DEP") @@ -110,7 +106,7 @@ func scanGoSum() { repo.setGoSumStatus("PRIMATIVE") continue } - if repo.status.CheckDirty() { + if repo.checkDirty() { log.Info("dirty repo:", latestversion, repo.status.String()) log.Info("dirty repo.getGoSumStatus =", repo.getGoSumStatus()) repo.setGoSumStatus("DIRTY") |
