Add ignorePkgUpdates field to config
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
964c45ffc4
commit
22a74aa793
|
@ -10,6 +10,7 @@ import (
|
|||
var defaultConfig = types.Config{
|
||||
RootCmd: "sudo",
|
||||
PagerStyle: "native",
|
||||
IgnorePkgUpdates: []string{},
|
||||
Repos: []types.Repo{
|
||||
{
|
||||
Name: "default",
|
||||
|
|
|
@ -4,6 +4,7 @@ package types
|
|||
type Config struct {
|
||||
RootCmd string `toml:"rootCmd"`
|
||||
PagerStyle string `toml:"pagerStyle"`
|
||||
IgnorePkgUpdates []string `toml:"ignorePkgUpdates"`
|
||||
Repos []Repo `toml:"repo"`
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,10 @@ func checkForUpdates(ctx context.Context, mgr manager.Manager, info *distro.OSRe
|
|||
|
||||
var out []db.Package
|
||||
for pkgName, pkgs := range found {
|
||||
if slices.Contains(cfg.IgnorePkgUpdates, pkgName) {
|
||||
continue
|
||||
}
|
||||
|
||||
if len(pkgs) > 1 {
|
||||
// Puts the element with the highest version first
|
||||
slices.SortFunc(pkgs, func(a, b db.Package) bool {
|
||||
|
|
Loading…
Reference in New Issue