mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16: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}}';
|
||||
}
|
||||
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') {
|
||||
dep.versioning = ubuntuVersioning.id;
|
||||
}
|
||||
|
|
|
@ -16,8 +16,9 @@ Array [
|
|||
"currentDigest": "sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
||||
"currentValue": "10.0.0",
|
||||
"datasource": "docker",
|
||||
"depName": "amd64/node",
|
||||
"depName": "node",
|
||||
"depType": "docker",
|
||||
"lookupName": "amd64/node",
|
||||
"replaceString": "amd64/node:10.0.0@sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
|
||||
},
|
||||
Object {
|
||||
|
|
Loading…
Reference in a new issue