fix(gomod): consider added/deleted vendor files too

Fixes #3590
This commit is contained in:
Rhys Arkins 2019-04-25 23:26:09 +02:00
parent 1df7231e5b
commit ce10293e57

View file

@ -164,7 +164,7 @@ async function getArtifacts(
seconds = Math.round(duration[0] + duration[1] / 1e9); seconds = Math.round(duration[0] + duration[1] / 1e9);
logger.info({ seconds, stdout, stderr }, 'Vendored modules'); logger.info({ seconds, stdout, stderr }, 'Vendored modules');
const status = await platform.getRepoStatus(); const status = await platform.getRepoStatus();
for (const f of status.modified) { for (const f of status.modified.concat(status.not_added)) {
if (f.startsWith(vendorDir)) { if (f.startsWith(vendorDir)) {
const localModified = upath.join(config.localDir, f); const localModified = upath.join(config.localDir, f);
res.push({ res.push({
@ -175,6 +175,14 @@ async function getArtifacts(
}); });
} }
} }
for (const f of status.deleted || []) {
res.push({
file: {
name: '|delete|',
contents: f,
},
});
}
} else { } else {
logger.warn( logger.warn(
'Vendor modules found - Renovate administrator should enable gitFs in order to update them' 'Vendor modules found - Renovate administrator should enable gitFs in order to update them'