From ce10293e57c1b6b0e40a61be6b8cea09f3f6a48f Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 25 Apr 2019 23:26:09 +0200 Subject: [PATCH] fix(gomod): consider added/deleted vendor files too Fixes #3590 --- lib/manager/gomod/artifacts.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/manager/gomod/artifacts.js b/lib/manager/gomod/artifacts.js index 64ba77584e..b5d3d05f7b 100644 --- a/lib/manager/gomod/artifacts.js +++ b/lib/manager/gomod/artifacts.js @@ -164,7 +164,7 @@ async function getArtifacts( seconds = Math.round(duration[0] + duration[1] / 1e9); logger.info({ seconds, stdout, stderr }, 'Vendored modules'); 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)) { const localModified = upath.join(config.localDir, f); res.push({ @@ -175,6 +175,14 @@ async function getArtifacts( }); } } + for (const f of status.deleted || []) { + res.push({ + file: { + name: '|delete|', + contents: f, + }, + }); + } } else { logger.warn( 'Vendor modules found - Renovate administrator should enable gitFs in order to update them' -- GitLab