rill some stuff

This commit is contained in:
Jeff Carr 2025-01-18 11:31:36 -06:00
parent 57883ffa61
commit f9c5e4c444
1 changed files with 14 additions and 4 deletions

View File

@ -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
}