cirrus_setup.sh 872 Bytes
Newer Older
1 2 3
#!/bin/bash
set -e

4 5 6 7
function error() {
  echo "$@" 1>&2
}

8 9 10 11
# This script is only meant to be run by the Cirrus CI system, not locally.
# It must be run from the root of the Flutter repo.

function accept_android_licenses() {
12
  yes "y" | flutter doctor --android-licenses > /dev/null 2>&1
13 14 15 16 17 18 19
}

echo "Flutter SDK directory is: $PWD"

# Run flutter to download dependencies and precompile things, and to disable
# analytics on the bots.
echo "Downloading build dependencies and pre-compiling Flutter snapshot"
20
./bin/flutter config --no-analytics
21 22 23 24 25

# Run doctor, to print it to the log for debugging purposes.
./bin/flutter doctor -v

# Accept licenses.
26 27
echo "Accepting Android licenses."
accept_android_licenses || (error "Accepting Android licenses failed." && false)
28 29 30

# Run pub get in all the repo packages.
echo "Updating packages for Flutter."
31
./bin/flutter update-packages