-
Notifications
You must be signed in to change notification settings - Fork 4
/
travis_script.sh
57 lines (43 loc) · 1.11 KB
/
travis_script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Fast fail the script on failures.
set -e
# Normalize Branch variable
export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
# Analyze cookbook samples
for D in cookbook/*; do
if [ -d "${D}" ]; then
cd ${D}
echo "Run flutter packages get on ${D}"
../../flutter/bin/flutter packages get
echo "Run flutter analyze on ${D}"
../../flutter/bin/flutter analyze
cd ../../
fi
done
# Analyze other samples
for D in *; do
if [ "$D" == "cookbook" ] || [ "$D" == "flutter" ] ; then
continue;
fi
if [ -d "${D}" ]; then
cd ${D}
echo "Run flutter packages get on ${D}"
../flutter/bin/flutter packages get
echo "Run flutter analyze on ${D}"
../flutter/bin/flutter analyze
cd ..
fi
done
# pass test
# declare -a PROJECT_NAMES=(
# # "jsonexample" \
# # "shrine" \
# )
# for PROJECT_NAME in "${PROJECT_NAMES[@]}"
# do
# echo "== Testing '${PROJECT_NAME}' on Flutter's $FLUTTER_VERSION channel =="
# pushd "${PROJECT_NAME}"
# ../flutter/bin/flutter test
# popd
# done
# echo "-- Success --"