setup_quickstart.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 2019 Google
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # Script to run in a CI `before_install` phase to setup the quickstart repo
  15. # so that it can be used for integration testing.
  16. if [[ "$TRAVIS_PULL_REQUEST" == "false" ||
  17. "$TRAVIS_PULL_REQUEST_SLUG" == "$TRAVIS_REPO_SLUG" ]]; then
  18. SAMPLE=$1
  19. # Specify repo so the Firebase module and header can be found in a
  20. # development pod install. This is needed for the `pod install` command.
  21. export FIREBASE_POD_REPO_FOR_DEV_POD=`pwd`
  22. git clone https://github.com/firebase/quickstart-ios.git
  23. ./scripts/localize_podfile.swift quickstart-ios/"$SAMPLE"/Podfile
  24. cd quickstart-ios/"$SAMPLE"
  25. # To test a branch, uncomment the following line
  26. # git checkout {BRANCH_NAME}
  27. bundle exec pod install
  28. TRAVIS_PULL_REQUEST="$TRAVIS_PULL_REQUEST" TRAVIS_PULL_REQUEST_SLUG=$"TRAVIS_PULL_REQUEST_SLUG" \
  29. ../scripts/install_prereqs/"$SAMPLE".sh
  30. # Secrets are repo specific, so we need to override with the firebase-ios-sdk
  31. # version.
  32. cp ../../Secrets/quickstart-ios/"$SAMPLE"/GoogleService-Info.plist ./
  33. cd -
  34. fi