mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
feat(docker): strip common prefixes from docker depName (#10997)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
parent
3096f340c8
commit
871f9f5b8e
2 changed files with 14 additions and 1 deletions
|
@ -48,6 +48,18 @@ export function getDep(
|
||||||
'{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}';
|
'{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}';
|
||||||
}
|
}
|
||||||
dep.datasource = datasourceDocker.id;
|
dep.datasource = datasourceDocker.id;
|
||||||
|
|
||||||
|
// Pretty up special prefixes
|
||||||
|
if (dep.depName) {
|
||||||
|
const specialPrefixes = ['amd64', 'arm64', 'library'];
|
||||||
|
for (const prefix of specialPrefixes) {
|
||||||
|
if (dep.depName.startsWith(`${prefix}/`)) {
|
||||||
|
dep.lookupName = dep.depName;
|
||||||
|
dep.depName = dep.depName.replace(`${prefix}/`, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dep.depName === 'ubuntu') {
|
if (dep.depName === 'ubuntu') {
|
||||||
dep.versioning = ubuntuVersioning.id;
|
dep.versioning = ubuntuVersioning.id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,9 @@ Array [
|
||||||
"currentDigest": "sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
"currentDigest": "sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
||||||
"currentValue": "10.0.0",
|
"currentValue": "10.0.0",
|
||||||
"datasource": "docker",
|
"datasource": "docker",
|
||||||
"depName": "amd64/node",
|
"depName": "node",
|
||||||
"depType": "docker",
|
"depType": "docker",
|
||||||
|
"lookupName": "amd64/node",
|
||||||
"replaceString": "amd64/node:10.0.0@sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
"replaceString": "amd64/node:10.0.0@sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
|
Loading…
Reference in a new issue