Versioning¶
Once Managers have extracted dependencies, and Datasources have located available versions, then Renovate will use a "Versioning" scheme to perform sorting and filtering of results.
The "versioning" is different for each package manager, because different package managers use different versioning schemes.
For example, npm
uses 1.0.0-beta.1
while pip
uses 1.0.0b1
.
Why you might need to manually configure versioning¶
Renovate interprets versions correctly out-of-the-box most of the time. But Renovate can't automatically detect all versioning schemes. So sometimes you need to tell the bot what versioning scheme it should use.
You can manually configure or override the versioning
value for a particular dependency.
You generally won't need to override the defaults for ecosystems which enforce a strict version scheme like npm
.
Configuring or overriding the default versioning
can be extra helpful for ecosystems like Docker, Kubernetes or Helm, where versioning is barely a "convention".
General concepts behind overriding versioning¶
- Although you can reconfigure versioning per-manager or per-datasource, you probably don't need such a broad change
- More commonly you would need to configure
versioning
for individual packages or potentially package patterns - The best way to do this is with
packageRules
, with a combination ofmatchManagers
,matchDatasources
, andmatchPackageNames
. Avoid configuringversioning
in a rule that also usesmatchUpdateTypes
, as the update types aren't known at the time theversioning
is applied
Examples of versioning overrides¶
Overriding Docker versioning to use a versioning specific for a package¶
The configuration below overrides Renovate's default docker
versioning for the python
Docker image and instead uses the pep440
versioning scheme to evaluate versions.
{
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackageNames": ["python"],
"versioning": "pep440"
}
]
}
Using a custom regex versioning scheme¶
{
"packageRules": [
{
"matchPackageNames": ["foo/bar"],
"versioning": "regex:^(?<compatibility>.*)-v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$"
}
]
}
Supported Versioning¶
Supported values for versioning
are:
aws-machine-image
azure-rest-api
bazel-module
cargo
composer
conan
deb
debian
devbox
docker
git
glasskube
go-mod-directive
gradle
hashicorp
helm
hermit
hex
ivy
kubernetes-api
loose
maven
nixpkgs
node
npm
nuget
pep440
perl
poetry
pvp
python
redhat
regex
rez
rpm
ruby
same-major
semver
semver-coerced
swift
ubuntu
unity3d