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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user