blob: da1763c396baf1349067650b644839b90e717655 [file] [log] [blame]
#!/bin/bash -e
# Script to generate mocks for Devtools from the flutter/tests registry
# https://github.com/flutter/tests
# This is executed as a pre-submit check for every PR in flutter/flutter
# Ensure the `dt` executable is on PATH.
root_dir=$(pwd)
tool_dir="$root_dir/tool/bin"
export PATH=$PATH:$tool_dir
# Force `dt` to use the current Flutter (which is available on PATH).
export DEVTOOLS_TOOL_FLUTTER_FROM_PATH=true
cd tool
flutter pub get
dt pub-get --upgrade
dt generate-code --no-pub-get
cd ..