internal/rosa: release monitoring via Anitya
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m44s
Test / Hakurei (push) Successful in 3m35s
Test / ShareFS (push) Successful in 3m48s
Test / Sandbox (race detector) (push) Successful in 4m56s
Test / Hakurei (race detector) (push) Successful in 5m53s
Test / Flake checks (push) Successful in 1m30s

This is much more sustainable than manual package flagging.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-05 20:55:45 +09:00
parent 75970a5650
commit a36b3ece16
2 changed files with 77 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"os/signal"
"path/filepath"
"runtime"
"strconv"
"syscall"
"time"
"unique"
@@ -129,6 +130,31 @@ func main() {
)
}
c.NewCommand("updates", command.UsageInternal, func([]string) error {
var n int
for i := range rosa.PresetEnd {
p := rosa.PArtifact(i)
meta := rosa.GetMetadata(p)
if meta.ID == 0 {
continue
}
if v, err := meta.GetVersions(ctx); err != nil {
return err
} else if current := rosa.Std.Version(p); v.Latest != current {
n++
log.Printf("%s %s < %s", meta.Name, current, v.Latest)
} else {
msg.Verbosef("%s is up to date", meta.Name)
}
}
if n > 0 {
return errors.New(strconv.Itoa(n) + " packages are out of date")
}
return nil
})
{
var (
flagGentoo string