fix(gomod): rename gorethink rethinkdb

This commit is contained in:
Rhys Arkins 2019-02-25 12:22:58 +01:00
parent f89ee685a4
commit ab45c544bb

View file

@ -41,6 +41,11 @@ function updateDependency(currentFileContent, upgrade) {
if (upgrade.depName.startsWith('gopkg.in/')) {
const oldV = upgrade.depName.split('.').pop();
newLine = newLine.replace(`.${oldV}`, `.v${upgrade.newMajor}`);
// Package renames - I couldn't think of a better place to do this
newLine = newLine.replace(
'gorethink/gorethink.v5',
'rethinkdb/rethinkdb-go.v5'
);
} else if (
upgrade.newMajor > 1 &&
!newLine.includes(`/v${upgrade.newMajor}`)