From d98dc246d7dbb4e679b31baa0168755f984ea83f Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 25 Apr 2019 23:21:09 +0200 Subject: [PATCH] fix(gomod): detect updated go.mod after artifacts Closes #3589 --- lib/manager/gomod/artifacts.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/manager/gomod/artifacts.js b/lib/manager/gomod/artifacts.js index 5ab787b8cb..ed0abd1c07 100644 --- a/lib/manager/gomod/artifacts.js +++ b/lib/manager/gomod/artifacts.js @@ -181,6 +181,19 @@ async function getArtifacts( ); } } + const finalGoModContent = (await fs.readFile( + localGoModFileName, + 'utf8' + )).replace(/\/\/ renovate-replace /g, ''); + if (finalGoModContent !== newGoModContent) { + logger.info('Found updated go.mod after go.sum update'); + res.push({ + file: { + name: goModFileName, + contents: finalGoModContent, + }, + }); + } return res; } catch (err) { logger.info({ err }, 'Failed to update go.sum'); -- GitLab