-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
custom-managers.ts
135 lines (133 loc) · 5.42 KB
/
custom-managers.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import type { Preset } from '../types';
/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */
export const presets: Record<string, Preset> = {
biomeVersions: {
customManagers: [
{
customType: 'regex',
datasourceTemplate: 'npm',
depNameTemplate: '@biomejs/biome',
fileMatch: ['(^|/)biome.jsonc?$'],
matchStrings: [
'"https://biomejs.dev/schemas/(?<currentValue>[^"]+)/schema.json"',
],
},
],
description:
'Update `$schema` version in `biome.json` configuration files.',
},
bitbucketPipelinesVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: ['(^|/)bitbucket-pipelines\\.ya?ml$'],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+.*\\s+[A-Za-z0-9_]+?_VERSION[ =:]\\s?["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
description: 'Update `_VERSION` variables in Bitbucket Pipelines',
},
dockerfileVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: [
'(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$',
'(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$',
],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s(?:ENV|ARG)\\s+[A-Za-z0-9_]+?_VERSION[ =]["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
description: 'Update `_VERSION` variables in Dockerfiles.',
},
githubActionsVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: [
'(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$',
'(^|/)action\\.ya?ml$',
],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
description:
'Update `_VERSION` environment variables in GitHub Action files.',
},
gitlabPipelineVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: ['\\.gitlab-ci\\.ya?ml$'],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
description:
'Update `_VERSION` environment variables in GitLab pipeline file.',
},
helmChartYamlAppVersions: {
customManagers: [
{
customType: 'regex',
datasourceTemplate: 'docker',
fileMatch: ['(^|/)Chart\\.yaml$'],
matchStrings: [
'#\\s*renovate: image=(?<depName>.*?)\\s+appVersion:\\s*["\']?(?<currentValue>[\\w+\\.\\-]*)',
],
},
],
description: 'Update `appVersion` value in Helm chart `Chart.yaml`.',
},
makefileVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: [
'(^|/)Makefile$',
'(^|/)makefile$',
'(^|/)GNUMakefile$',
'\\.mk$',
],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:*\\??=\\s*["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
description: 'Update `_VERSION` variables in Makefiles.',
},
mavenPropertyVersions: {
customManagers: [
{
customType: 'regex',
datasourceTemplate:
'{{#if datasource}}{{{datasource}}}{{else}}maven{{/if}}',
fileMatch: ['(^|/)pom\\.xml$'],
matchStrings: [
'<!--\\s?renovate:( datasource=(?<datasource>[a-z-.]+?))? depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+-->\\s+<.+\\.version>(?<currentValue>.+)<\\/.+\\.version>',
],
versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',
},
],
description: 'Update `*.version` properties in `pom.xml` files.',
},
tfvarsVersions: {
customManagers: [
{
customType: 'regex',
fileMatch: ['.+\\.tfvars$'],
matchStrings: [
'#\\s*renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?(?: extractVersion=(?<extractVersion>.*?))?\\s.*?_version\\s*=\\s*"(?<currentValue>.*)"',
],
versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',
},
],
description: 'Update `*_version` variables in `.tfvars` files.',
},
};