pod_install.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 2018 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. # Within Travis, installs prerequisites for a build.
  15. # Examines the following configured environment variables that should be
  16. # specified in an env: block
  17. # - PROJECT - Firebase or Firestore
  18. # - METHOD - xcodebuild or cmake; default is xcodebuild
  19. # - PLATFORM - iOS, macOS, or tvOS
  20. if [[ -z "$METHOD" ]]; then
  21. METHOD="xcodebuild"
  22. fi
  23. case "$PROJECT-$METHOD-$PLATFORM" in
  24. Firebase-xcodebuild-iOS)
  25. bundle exec pod install --project-directory=Example --repo-update
  26. bundle exec pod install --project-directory=Functions/Example
  27. ;;
  28. Firebase-xcodebuild-*)
  29. bundle exec pod install --project-directory=Example --repo-update
  30. ;;
  31. Firestore-xcodebuild-*)
  32. bundle exec pod install --project-directory=Firestore/Example --repo-update
  33. ;;
  34. Firestore-cmake-*)
  35. bundle exec pod install --project-directory=Example --repo-update
  36. bundle exec pod install --project-directory=Firestore/Example \
  37. --no-repo-update
  38. ;;
  39. *)
  40. echo "Unknown project-method combo" 1>&2
  41. echo " PROJECT=$PROJECT" 1>&2
  42. echo " METHOD=$METHOD" 1>&2
  43. exit 1
  44. ;;
  45. esac