1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/tool/flutter_ci_script_shared.sh
Andrew Brogdon b26f2cccc1 Unbreaks dev and beta CI (#793)
* Unbreaking dev and beta CI

* Newline all the things.

* Unhooking desktop_photo_search from beta and dev CI

* Unhooking web_dashboard and veggieseasons as well
2021-05-05 17:10:48 -07:00

35 lines
917 B
Bash

function ci_projects () {
local channel="$1"
shift
local arr=("$@")
for PROJECT_NAME in "${arr[@]}"
do
echo "== Testing '${PROJECT_NAME}' on Flutter's $channel channel =="
pushd "${PROJECT_NAME}"
# Grab packages.
flutter pub get
# Run the analyzer to find any static analysis issues.
flutter analyze
# Reformat the web plugin registrant, if necessary.
if [ -f "lib/generated_plugin_registrant.dart" ]
then
echo "Renaming $(pwd)/lib/generated_plugin_registrant.dart"
flutter format "lib/generated_plugin_registrant.dart"
fi
# Run the formatter on all the dart files to make sure everything's linted.
flutter format -n --set-exit-if-changed .
# Run the actual tests.
if [ -d "test" ]
then
flutter test
fi
popd
done
}