aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/manager
diff options
context:
space:
mode:
Diffstat (limited to 'lib/manager')
-rw-r--r--lib/manager/regex/__snapshots__/index.spec.ts.snap9
-rw-r--r--lib/manager/regex/index.spec.ts2
-rw-r--r--lib/manager/regex/index.ts1
-rw-r--r--lib/manager/regex/readme.md1
-rw-r--r--lib/manager/types.ts1
5 files changed, 14 insertions, 0 deletions
diff --git a/lib/manager/regex/__snapshots__/index.spec.ts.snap b/lib/manager/regex/__snapshots__/index.spec.ts.snap
index 6071a39e352..bcc3505484b 100644
--- a/lib/manager/regex/__snapshots__/index.spec.ts.snap
+++ b/lib/manager/regex/__snapshots__/index.spec.ts.snap
@@ -81,11 +81,13 @@ Object {
exports[`manager/regex/index extracts multiple dependencies 1`] = `
Object {
+ "depTypeTemplate": "final",
"deps": Array [
Object {
"currentValue": "6.2",
"datasource": "gradle-version",
"depName": "gradle",
+ "depType": "final",
"replaceString": "ENV GRADLE_VERSION=6.2 # gradle-version/gradle&versioning=maven
",
"versioning": "maven",
@@ -94,6 +96,7 @@ Object {
"currentValue": "10.19.0",
"datasource": "github-tags",
"depName": "nodejs/node",
+ "depType": "final",
"replaceString": "ENV NODE_VERSION=10.19.0 # github-tags/nodejs/node&versioning=node
",
"versioning": "node",
@@ -102,6 +105,7 @@ Object {
"currentValue": "1.9.3",
"datasource": "github-releases",
"depName": "composer/composer",
+ "depType": "final",
"replaceString": "ENV COMPOSER_VERSION=1.9.3 # github-releases/composer/composer
",
"versioning": "semver",
@@ -110,6 +114,7 @@ Object {
"currentValue": "1.9.0",
"datasource": "rubygems",
"depName": "cocoapods",
+ "depType": "final",
"replaceString": "ENV COCOAPODS_VERSION=1.9.0 # rubygems/cocoapods&versioning=ruby
",
"versioning": "ruby",
@@ -118,6 +123,7 @@ Object {
"currentValue": "19.03.1",
"datasource": "github-releases",
"depName": "docker/docker-ce",
+ "depType": "final",
"replaceString": "ENV DOCKER_VERSION=19.03.1 # github-releases/docker/docker-ce&versioning=docker
",
"versioning": "docker",
@@ -126,6 +132,7 @@ Object {
"currentValue": "1.0.0",
"datasource": "github-releases",
"depName": "python-poetry/poetry",
+ "depType": "final",
"replaceString": "ENV POETRY_VERSION=1.0.0 # github-releases/python-poetry/poetry
",
"versioning": "semver",
@@ -134,6 +141,7 @@ Object {
"currentValue": "6.10.2",
"datasource": "npm",
"depName": "npm",
+ "depType": "final",
"replaceString": "ENV NPM_VERSION=6.10.2 # npm/npm
",
"versioning": "semver",
@@ -142,6 +150,7 @@ Object {
"currentValue": "1.19.1",
"datasource": "npm",
"depName": "yarn",
+ "depType": "final",
"replaceString": "ENV YARN_VERSION=1.19.1 # npm/yarn
",
"versioning": "semver",
diff --git a/lib/manager/regex/index.spec.ts b/lib/manager/regex/index.spec.ts
index 7f3d9bdfc68..13258f85f2d 100644
--- a/lib/manager/regex/index.spec.ts
+++ b/lib/manager/regex/index.spec.ts
@@ -21,6 +21,7 @@ describe('manager/regex/index', () => {
],
versioningTemplate:
'{{#if versioning}}{{versioning}}{{else}}semver{{/if}}',
+ depTypeTemplate: 'final',
};
const res = await extractPackageFile(
dockerfileContent,
@@ -35,6 +36,7 @@ describe('manager/regex/index', () => {
expect(res.deps.find((dep) => dep.depName === 'gradle').versioning).toEqual(
'maven'
);
+ expect(res.deps.filter((dep) => dep.depType === 'final')).toHaveLength(8);
});
it('returns null if no dependencies found', async () => {
const config = {
diff --git a/lib/manager/regex/index.ts b/lib/manager/regex/index.ts
index 70f9c181ef1..7a866a6f70e 100644
--- a/lib/manager/regex/index.ts
+++ b/lib/manager/regex/index.ts
@@ -22,6 +22,7 @@ const validMatchFields = [
'versioning',
'extractVersion',
'registryUrl',
+ 'depType',
];
const mergeFields = ['registryUrls', ...validMatchFields];
diff --git a/lib/manager/regex/readme.md b/lib/manager/regex/readme.md
index c7289ff64a8..71d5337bb07 100644
--- a/lib/manager/regex/readme.md
+++ b/lib/manager/regex/readme.md
@@ -21,6 +21,7 @@ Configuration-wise, it works like this:
- You must have either a `depName` capture group or a `depNameTemplate` config field
- You can optionally have a `lookupName` capture group or a `lookupNameTemplate` if it differs from `depName`
- You must have either a `datasource` capture group or a `datasourceTemplate` config field
+- You can optionally have a `depType` capture group or a `depTypeTemplate` config field
- You can optionally have a `versioning` capture group or a `versioningTemplate` config field. If neither are present, `semver` will be used as the default
- You can optionally have an `extractVersion` capture group or an `extractVersionTemplate` config field
- You can optionally have a `currentDigest` capture group.
diff --git a/lib/manager/types.ts b/lib/manager/types.ts
index 64f6e496af0..311ad5e4928 100644
--- a/lib/manager/types.ts
+++ b/lib/manager/types.ts
@@ -35,6 +35,7 @@ export interface CustomExtractConfig extends ExtractConfig {
lookupNameTemplate?: string;
datasourceTemplate?: string;
versioningTemplate?: string;
+ depTypeTemplate?: string;
}
export interface UpdateArtifactsConfig {