Skip to content

Commit b89afc0

Browse files
authored
Merge pull request #406 from rawlingsj/ignore_patterns
add `ignore-regex-patterns` update config to indicate you want to ign…
2 parents a8a9529 + 6128339 commit b89afc0

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

docs/UPDATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,17 @@ update:
5252
use-tag: true # Optional, override the default of using a GitHub release to identify related tag to fetch. Not all projects use GitHub releases but just use tags
5353
tag-filter: foo # Optional, filter to apply when searching tags on a GitHub repository, some repos maintain a mixture of tags for different major versions for example
5454
```
55+
56+
## Ignore versions
57+
58+
Some upstream projects create tags that can interfere with version comparisons, you may find the need to ignore these.
59+
60+
To achieve this you can specify a list of regex patterns to identify versions that you want to ignore:
61+
62+
```yaml
63+
update:
64+
enabled: true
65+
ignore-regex-patterns:
66+
- "ignore_me*"
67+
- "*ignore_me"
68+
```

pkg/build/build.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,13 @@ type AdvisoryContent struct {
233233

234234
// Update provides information used to describe how to keep the package up to date
235235
type Update struct {
236-
Enabled bool `yaml:"enabled"` // toggle if updates should occur
237-
Manual bool `yaml:"manual"` // indicates that this package should be manually updated, usually taking care over special version numbers
238-
Shared bool `yaml:"shared,omitempty"` // indicate that an update to this package requires an epoch bump of downstream dependencies, e.g. golang, java
239-
VersionSeparator string `yaml:"version-separator,omitempty"` // override the version separator if it is nonstandard
240-
ReleaseMonitor *ReleaseMonitor `yaml:"release-monitor,omitempty"`
241-
GitHubMonitor *GitHubMonitor `yaml:"github,omitempty"`
236+
Enabled bool `yaml:"enabled"` // toggle if updates should occur
237+
Manual bool `yaml:"manual"` // indicates that this package should be manually updated, usually taking care over special version numbers
238+
Shared bool `yaml:"shared,omitempty"` // indicate that an update to this package requires an epoch bump of downstream dependencies, e.g. golang, java
239+
VersionSeparator string `yaml:"version-separator,omitempty"` // override the version separator if it is nonstandard
240+
IgnoreRegexPatterns []string `yaml:"ignore-regex-patterns,omitempty"` // a slice of regex patterns to match an upstream version and ignore
241+
ReleaseMonitor *ReleaseMonitor `yaml:"release-monitor,omitempty"`
242+
GitHubMonitor *GitHubMonitor `yaml:"github,omitempty"`
242243
}
243244

244245
// ReleaseMonitor indicates using the API for https://release-monitoring.org/

0 commit comments

Comments
 (0)