Skip to content

Commit

Permalink
docs: add restriction on matchCurrentVersion (#21485)
Browse files Browse the repository at this point in the history
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
TWiStErRob and rarkins committed Apr 14, 2023
1 parent 5fb1747 commit b548a93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ The `currentVersion` field will be one of the following (in order of preference)

Consider using instead `matchCurrentValue` if you wish to match against the raw string value of a dependency.

`matchCurrentVersion` can be an exact SemVer version or a SemVer range:
`matchCurrentVersion` can be an exact version or a version range:

```json
{
Expand All @@ -2044,6 +2044,10 @@ Consider using instead `matchCurrentValue` if you wish to match against the raw
}
```

The syntax of the version range must follow the [versioning scheme](https://docs.renovatebot.com/modules/versioning/#supported-versioning) used by the matched package(s).
This is usually defined by the [manager](https://docs.renovatebot.com/modules/manager/#supported-managers) which discovered them or by the default versioning for the package's [datasource](https://docs.renovatebot.com/modules/datasource/).
For example, a Gradle package would typically need Gradle constraint syntax (e.g. `[,7.0)`) and not SemVer syntax (e.g. `<7.0`).

This field also supports Regular Expressions which must begin and end with `/`.
For example, the following enforces that only `1.*` versions will be used:

Expand Down

0 comments on commit b548a93

Please sign in to comment.