Skip to content
Snippets Groups Projects
Unverified Commit e344b538 authored by strophy's avatar strophy Committed by GitHub
Browse files

docs: add readme and regex example for git-refs datasource (#19368)

parent a7fd6d5b
No related branches found
No related tags found
No related merge requests found
This datasource can be used in combination with [regex managers](https://docs.renovatebot.com/modules/manager/regex/) to keep dependencies up-to-date which are not specifically supported by Renovate.
This datasource returns a reference from a Git repository.
The `depName` (or `packageName` if in use) must be a fully qualified domain name.
To fetch the latest digest of a reference instead of the named reference, specify the reference as the `currentValue` and match on the `currentDigest`.
**Usage example**
The following is an example where you would maintain the HEAD digest of the `master` branch of a repository.
You would configure a generic regex manager in `renovate.json` for files named `versions.ini`:
```json
{
"regexManagers": [
{
"fileMatch": ["^versions.ini$"],
"matchStrings": ["GOOGLE_API_VERSION=(?<currentDigest>.*?)\\n"],
"currentValueTemplate": "master",
"depNameTemplate": "googleapis",
"packageNameTemplate": "https://github.com/googleapis/googleapis",
"datasourceTemplate": "git-refs"
}
]
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment