flutter/dev/bots/travis_script.sh
xster fb37bd1323
Revert "Let travis test archiving per commit too" (#16050)
* Revert "Roll engine to 6473f1b106485cb0b4ea569af383173daeef8895 (#16032)"

This reverts commit 844ced010a.

* Revert "Let travis test archiving per commit too (#16004)"

This reverts commit df5905f382.
2018-03-28 18:31:27 -07:00

40 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -ex
export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"
if [ "$SHARD" = "build_and_deploy_gallery" ]; then
version=$(<version)
echo "Building and deploying Flutter Gallery $version"
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
echo "Building Flutter Gallery for Android..."
export ANDROID_HOME=`pwd`/android-sdk
(cd examples/flutter_gallery; flutter build apk --release)
echo "Android Flutter Gallery built"
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "dev" && $version != *"pre"* ]]; then
echo "Deploying to Play Store..."
(cd examples/flutter_gallery/android; bundle install && bundle exec fastlane deploy_play_store)
else
echo "Flutter Gallery is only deployed to the Play Store on merged and tagged dev branch commits"
fi
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
echo "Building Flutter Gallery for iOS..."
(cd examples/flutter_gallery; flutter build ios --release --no-codesign)
echo "iOS Flutter Gallery built"
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "dev" && $version != *"pre"* ]]; then
echo "Re-building with distribution profile and deploying to TestFlight..."
(cd examples/flutter_gallery/ios; bundle install && bundle exec fastlane build_and_deploy_testflight)
else
echo "Flutter Gallery is only deployed to the TestFlight on merged and tagged dev branch commits"
fi
fi
elif [ "$SHARD" = "docs" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Generate the API docs, upload them
./dev/bots/docs.sh
fi
else
dart ./dev/bots/test.dart
fi