From f9c5e4c44400c49661db5b54513b25bbe5baa97a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 18 Jan 2025 11:31:36 -0600 Subject: [PATCH] rill some stuff --- findNext.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/findNext.go b/findNext.go index 34f09b3..536d798 100644 --- a/findNext.go +++ b/findNext.go @@ -15,10 +15,20 @@ var findFix bool = false var findOk bool = true func rillFixGodeps(repo *gitpb.Repo) error { + if repo.GetTargetVersion() == "" { + // not set to upgrade + return nil + } + if repo.GetLastTag() == repo.GetTargetVersion() { + return nil + } + if me.forge.Config.IsReadOnly(repo.GetGoPath()) { + return nil + } if fixGodeps(repo) { - log.Info("fixGoDeps() returned true") + log.Info("Rill fixGoDeps() returned true") } else { - log.Info("fixGoDeps() returned false") + log.Info("Rill fixGoDeps() returned false") } return nil } @@ -28,7 +38,7 @@ func rillFixGodeps(repo *gitpb.Repo) error { // rename this findNext() func findNext() bool { now := time.Now() - me.forge.RillFuncError(2, 2, rillFixGodeps) + me.forge.RillFuncError(20, 10, rillFixGodeps) log.Printf("rillFixGodeps() (%d total repos) took:%s\n", me.forge.Repos.Len(), shell.FormatDuration(time.Since(now))) findCounter = 0 @@ -50,7 +60,7 @@ func findNext() bool { log.Info("findNext() skipping readonly") continue } - if check.CheckDirty() { + if check.IsDirty() { log.Info("findNext() skipping dirty") continue }