mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(bazel): http_archive url not updated
This commit is contained in:
parent
6eec81fc49
commit
bc997ce82e
1 changed files with 3 additions and 1 deletions
|
@ -60,7 +60,9 @@ async function updateDependency(fileContent, upgrade) {
|
|||
.createHash('sha256')
|
||||
.update(file)
|
||||
.digest('hex');
|
||||
const currentPattern = /(urls\s*=\s*\[")[^"]+("])/;
|
||||
const currentPattern = upgrade.def.includes('urls')
|
||||
? /(urls\s*=\s*\[")[^"]+("])/
|
||||
: /(url\s*=\s*")[^"]+(")/;
|
||||
newDef = upgrade.def.replace(currentPattern, `$1${newUrl}$2`);
|
||||
newDef = newDef.replace(/(sha256\s*=\s*)"[^"]+"/, `$1"${hash}"`);
|
||||
newDef = newDef.replace(
|
||||
|
|
Loading…
Reference in a new issue