build_and_test.sh 637 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1 2 3 4
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Dan Field's avatar
Dan Field committed
5 6 7 8 9 10

set -e

cd "$(dirname "$0")"

pushd flutterapp
11
../../../../bin/flutter build ios --debug --simulator --no-codesign
Dan Field's avatar
Dan Field committed
12 13 14 15
popd

pod install
os_version=$(xcrun --show-sdk-version --sdk iphonesimulator)
16 17 18 19 20 21 22 23 24 25 26

PRETTY="cat"
if which xcpretty; then
  PRETTY="xcpretty"
fi

set -o pipefail && xcodebuild \
  -workspace ios_add2app.xcworkspace \
  -scheme ios_add2appTests \
  -sdk "iphonesimulator$os_version" \
  -destination "OS=$os_version,name=iPhone X" test | $PRETTY