mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
35 lines
533 B
Bash
Executable File
35 lines
533 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -xe
|
|
|
|
if [[ $(flutter format -n .) ]]; then
|
|
echo "flutter format issue"
|
|
exit 1
|
|
fi
|
|
|
|
flutter pub get
|
|
|
|
# We need to run pubget on all the examples
|
|
for f in doc/examples/**/pubspec.yaml; do
|
|
d=$(dirname $f)
|
|
cd $d
|
|
flutter pub get
|
|
cd - > /dev/null
|
|
done
|
|
|
|
analyzer() {
|
|
cd $1
|
|
flutter pub get
|
|
result=$(flutter analyze .)
|
|
if ! echo "$result" | grep -q "No issues found!"; then
|
|
echo "$result"
|
|
echo "dartanalyzer issue: $1"
|
|
exit 1
|
|
fi
|
|
cd - > /dev/null
|
|
}
|
|
|
|
analyzer .
|
|
|
|
echo "success"
|
|
exit 0
|