You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/modules/manager/gomod/artifacts.ts
+20-1
Original file line number
Diff line number
Diff line change
@@ -238,6 +238,8 @@ export async function updateArtifacts({
238
238
// because the dependencies' go.mod is not in 'updatedDeps' to determine
239
239
// which highest version is actually required.
240
240
extraGetArguments.push(`go@${goConstraint}`);
241
+
// TODO: if we are already at latest compatible version, then renovate still bumps it
242
+
// instead the PR should be erroring out!!
241
243
}
242
244
}
243
245
}
@@ -386,7 +388,25 @@ export async function updateArtifacts({
386
388
387
389
awaitexec(execCommands,execOptions);
388
390
391
+
constres: UpdateArtifactsResult[]=[];
389
392
conststatus=awaitgetRepoStatus();
393
+
if(
394
+
status.modified.length===0&&
395
+
updatedDeps.length>0&&
396
+
config.constraints?.go
397
+
){
398
+
constdowngradeNotice=`Updates are constrained to go version ${config.constraints.go} but the dependency required a more recent version.\nTherefore, the update was discarded.`;
399
+
400
+
logger.debug('Returning no update warning');
401
+
res.push({
402
+
notice: {
403
+
file: goModFileName,
404
+
message: downgradeNotice,
405
+
},
406
+
});
407
+
408
+
returnres;
409
+
}
390
410
if(
391
411
!status.modified.includes(sumFileName)&&
392
412
!status.modified.includes(goModFileName)&&
@@ -395,7 +415,6 @@ export async function updateArtifacts({
0 commit comments