@@ -547,20 +547,22 @@ ${indentation}The first version listed in CHANGELOG.md is $fromChangeLog.
547
547
return null ;
548
548
}
549
549
550
+ bool missingVersionChange = false ;
551
+ bool missingChangelogChange = false ;
550
552
if (state.needsVersionChange) {
551
553
if (_prLabels.contains (_missingVersionChangeOverrideLabel)) {
552
554
logWarning ('Ignoring lack of version change due to the '
553
555
'"$_missingVersionChangeOverrideLabel " label.' );
554
556
} else {
557
+ missingVersionChange = true ;
555
558
printError (
556
559
'No version change found, but the change to this package could '
557
560
'not be verified to be exempt\n '
558
561
'from version changes according to repository policy.\n '
559
562
'If this is a false positive, please comment in '
560
563
'the PR to explain why the PR\n '
561
564
'is exempt, and add (or ask your reviewer to add) the '
562
- '"$_missingVersionChangeOverrideLabel " label.' );
563
- return 'Missing version change' ;
565
+ '"$_missingVersionChangeOverrideLabel " label.\n ' );
564
566
}
565
567
}
566
568
@@ -569,18 +571,33 @@ ${indentation}The first version listed in CHANGELOG.md is $fromChangeLog.
569
571
logWarning ('Ignoring lack of CHANGELOG update due to the '
570
572
'"$_missingChangelogChangeOverrideLabel " label.' );
571
573
} else {
574
+ missingChangelogChange = true ;
572
575
printError ('No CHANGELOG change found.\n '
573
576
'If this PR needs an exemption from the standard policy of listing '
574
577
'all changes in the CHANGELOG,\n '
575
578
'comment in the PR to explain why the PR is exempt, and add (or '
576
579
'ask your reviewer to add) the\n '
577
580
'"$_missingChangelogChangeOverrideLabel " label.\n '
578
581
'Otherwise, please add a NEXT entry in the CHANGELOG as described in '
579
- 'the contributing guide.' );
580
- return 'Missing CHANGELOG change' ;
582
+ 'the contributing guide.\n ' );
581
583
}
582
584
}
583
585
586
+ if (missingVersionChange && missingChangelogChange) {
587
+ printError ('If this PR is not exempt, you may update the version and '
588
+ 'CHANGELOG with the "update-release-info" command. Example:\n '
589
+ '\$ dart run script/tool/bin/flutter_plugin_tools.dart update-release-info \\\n '
590
+ '\t --version=minimal \\\n '
591
+ '\t --base-branch=upstream/main \\\n '
592
+ '\t --changelog="Description of the change."' );
593
+ }
594
+ if (missingVersionChange) {
595
+ return 'Missing version change' ;
596
+ }
597
+ if (missingChangelogChange) {
598
+ return 'Missing CHANGELOG change' ;
599
+ }
600
+
584
601
return null ;
585
602
}
586
603
}
0 commit comments