Skip to content

Commit 4070d5d

Browse files
committed
update
1 parent 7376e4a commit 4070d5d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

script/tool/lib/src/version_check_command.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ class VersionCheckCommand extends PackageLoopingCommand {
201201
final List<String> errors = <String>[];
202202

203203
final CiConfig? ciConfig = package.parseCiConfig();
204-
final List<String> changedFiles = await _gitVersionFinder.getChangedFiles();
205204
final _CurrentVersionState versionState =
206205
await _getVersionState(package, pubspec: pubspec);
207206
final bool usesBatchRelease = ciConfig?.isBatchRelease ?? false;
@@ -210,6 +209,8 @@ class VersionCheckCommand extends PackageLoopingCommand {
210209
final bool hasPostReleaseLabel =
211210
_prLabels.contains('post-release-${pubspec.name}');
212211
if (usesBatchRelease && !hasPostReleaseLabel) {
212+
final List<String> changedFiles =
213+
await _gitVersionFinder.getChangedFiles();
213214
// For batch release, we only check pending changelog files.
214215
errors.addAll(await _validatePendingChangelogs(package, changedFiles));
215216
// The changelog and version should not be updated directly.

script/tool/test/version_check_command_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,8 +1292,6 @@ packages/plugin/lib/plugin.dart
12921292
FakeProcessInfo(MockProcess(stdout: '''
12931293
packages/plugin/lib/plugin.dart
12941294
''')),
1295-
FakeProcessInfo(
1296-
MockProcess(stdout: ''), <String>['--name-only', 'main', 'HEAD']),
12971295
// Dart file diff.
12981296
FakeProcessInfo(MockProcess(stdout: '''
12991297
+ /// Important new information for API clients!

0 commit comments

Comments
 (0)