Skip to content

Commit 4c82b49

Browse files
authored
In the buildbot CI step, reset built web files before trying to publish (dart-lang#3896)
These files can have minor differences in them (depending on the version of Dart?), so that it is difficult for them to always be identical to the ones checked in, during CI. Then there is a new warning that `pub publish --dry-run` produces, if the current git checkout is not clean: dart-lang/pub#4373. We need to reset these files to avoid that warning.
1 parent 76678f6 commit 4c82b49

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tool/task.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,15 @@ Rebuild them with "dart tool/task.dart build" and check the results in.
834834
'The web frontend (web/docs.dart) needs to be recompiled; rebuild it '
835835
'with "dart tool/task.dart build web".');
836836
}
837+
838+
// Reset some files for `try-publish` step. This check looks for changes in
839+
// the current git checkout: https://github.com/dart-lang/pub/pull/4373.
840+
Process.runSync('git', [
841+
'checkout',
842+
'--',
843+
'lib/resources/docs.dart.js',
844+
'lib/resources/docs.dart.js.map',
845+
]);
837846
}
838847

839848
/// Whether the analyzer in use (as found in `pubspec.lock`) is the target

0 commit comments

Comments
 (0)