mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-01 02:00:10 +00:00
fix(gomod): use go get to generate pseudo versions for digest updates (#4386)
Instead of generating the pseudo version ourselves, replace the existing pseudo version with a digest only and let “go get” massage it into a valid pseudo version.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import { logger } from '../../logger';
|
||||
import { Upgrade } from '../common';
|
||||
|
||||
@@ -57,9 +56,10 @@ export function updateDependency(
|
||||
{ depName, lineToChange, newDigestRightSized },
|
||||
'gomod: need to update digest'
|
||||
);
|
||||
const currentDateTime = DateTime.local().toFormat('yyyyMMddHHmmss');
|
||||
const newValue = `v0.0.0-${currentDateTime}-${newDigestRightSized}`;
|
||||
newLine = lineToChange.replace(updateLineExp, `$1$2${newValue}`);
|
||||
newLine = lineToChange.replace(
|
||||
updateLineExp,
|
||||
`$1$2${newDigestRightSized}`
|
||||
);
|
||||
} else {
|
||||
newLine = lineToChange.replace(updateLineExp, `$1$2${upgrade.newValue}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user