<commit_before>#!/bin/bash

set -ex

export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"

if [ "$SHARD" = "build_and_deploy_gallery" ]; then
  echo "Building and deploying Flutter Gallery"
  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" ]; then # TODO(xster): add back && [ "$TRAVIS_BRANCH" = "dev" ] after testing
      echo "Deploying to Play Store..."
      (cd examples/flutter_gallery/android; bundle exec fastlane deploy_play_store)
    else
      echo "Flutter Gallery is only deployed to the Play Store on merged 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" ]; then # TODO(xster): add back && [ "$TRAVIS_BRANCH" = "dev" ] after testing
      echo "Re-building with distribution profile and deploying to TestFlight..."
      (cd examples/flutter_gallery/ios; bundle exec fastlane build_and_deploy_testflight)
    else
      echo "Flutter Gallery is only deployed to the TestFlight on merged 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
<commit_msg>Bundle install before running fastlane on Travis (#14470)<commit_after>#!/bin/bash

set -ex

export PATH="$PWD/bin:$PWD/bin/cache/dart-sdk/bin:$PATH"

if [ "$SHARD" = "build_and_deploy_gallery" ]; then
  echo "Building and deploying Flutter Gallery"
  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" ]; then # TODO(xster): add back && [ "$TRAVIS_BRANCH" = "dev" ] after testing
      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 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" ]; then # TODO(xster): add back && [ "$TRAVIS_BRANCH" = "dev" ] after testing
      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 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

{'fraction_non_alphanumeric': 0.11625766871165644, 'fraction_numerical': 0.0015337423312883436, 'mean_word_length': 3.5166204986149583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6241772', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1046, 'n_words': 335}