mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix: check currentValue before generating newValue
This commit is contained in:
parent
f6454ba1a7
commit
bb64598d6a
1 changed files with 15 additions and 13 deletions
|
@ -32,19 +32,21 @@ export function generateUpdate(
|
|||
}
|
||||
}
|
||||
const { currentValue } = config;
|
||||
try {
|
||||
update.newValue = versioning.getNewValue({
|
||||
currentValue,
|
||||
rangeStrategy,
|
||||
currentVersion,
|
||||
newVersion,
|
||||
});
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
logger.warn(
|
||||
{ err, currentValue, rangeStrategy, currentVersion, newVersion },
|
||||
'getNewValue error'
|
||||
);
|
||||
update.newValue = currentValue;
|
||||
if (currentValue) {
|
||||
try {
|
||||
update.newValue = versioning.getNewValue({
|
||||
currentValue,
|
||||
rangeStrategy,
|
||||
currentVersion,
|
||||
newVersion,
|
||||
});
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
logger.warn(
|
||||
{ err, currentValue, rangeStrategy, currentVersion, newVersion },
|
||||
'getNewValue error'
|
||||
);
|
||||
update.newValue = currentValue;
|
||||
}
|
||||
}
|
||||
update.newMajor = versioning.getMajor(newVersion);
|
||||
update.newMinor = versioning.getMinor(newVersion);
|
||||
|
|
Loading…
Reference in a new issue