Skip to content

Commit

Permalink
In the buildbot CI step, reset built web files before trying to publi…
Browse files Browse the repository at this point in the history
…sh (#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.
  • Loading branch information
srawlins authored Oct 3, 2024
1 parent 76678f6 commit 4c82b49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tool/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,15 @@ Rebuild them with "dart tool/task.dart build" and check the results in.
'The web frontend (web/docs.dart) needs to be recompiled; rebuild it '
'with "dart tool/task.dart build web".');
}

// Reset some files for `try-publish` step. This check looks for changes in
// the current git checkout: https://github.com/dart-lang/pub/pull/4373.
Process.runSync('git', [
'checkout',
'--',
'lib/resources/docs.dart.js',
'lib/resources/docs.dart.js.map',
]);
}

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

0 comments on commit 4c82b49

Please sign in to comment.