1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-26 22:31:45 +00:00

Moving Shrine into a material_studies subdirectory (#128)

This commit is contained in:
Andrew Brogdon
2019-08-14 16:27:59 -07:00
committed by GitHub
parent c68165e8a5
commit cf270c32f3
84 changed files with 25 additions and 5 deletions

View File

@@ -1,5 +1,17 @@
set -e
# Backs up one directory at a time, looking for one called "flutter".
function getFlutterPath() {
local path=".."
local counter=0
while [[ "${counter}" -lt 10 ]]; do
[ -d "${path}/flutter" ] && echo "${path}/flutter" && return 0
let counter++
path="${path}/.."
done
}
declare -a PROJECT_NAMES=(
"animations" \
"flutter_maps_firestore" \
@@ -10,7 +22,7 @@ declare -a PROJECT_NAMES=(
"platform_view_swift" \
"provider_counter" \
"provider_shopper" \
"shrine" \
"material_studies/shrine" \
"veggieseasons" \
)
@@ -19,14 +31,22 @@ do
echo "== Testing '${PROJECT_NAME}' on Flutter's $FLUTTER_VERSION channel =="
pushd "${PROJECT_NAME}"
localSdkPath=$(getFlutterPath)
if [ -z "$localSdkPath" ]
then
echo "Failed to find Flutter SDK for '${PROJECT_NAME}'."
exit 1
fi
# Run the analyzer to find any static analysis issues.
../flutter/bin/flutter analyze
"${localSdkPath}/bin/flutter" analyze
# Run the formatter on all the dart files to make sure everything's linted.
../flutter/bin/flutter format -n --set-exit-if-changed .
"${localSdkPath}/bin/flutter" format -n --set-exit-if-changed .
# Run the actual tests.
../flutter/bin/flutter test
"${localSdkPath}/bin/flutter" test
popd
done