zip_quickstart_test.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. # Copyright 2022 Google LLC
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # Build the quickstart. If we're running on the main repo (not a fork), we
  16. # also run the tests along with the decoded GoogleService-Info.plist files.
  17. set -eo pipefail
  18. set -x
  19. EXIT_STATUS=0
  20. cd "${SAMPLE}"
  21. if [[ ! -z "$LEGACY" ]]; then
  22. cd "Legacy${SAMPLE}Quickstart"
  23. fi
  24. (
  25. xcodebuild \
  26. -project ${SAMPLE}Example.xcodeproj \
  27. -scheme ${SAMPLE}Example${SWIFT_SUFFIX} \
  28. -destination 'platform=iOS Simulator,name=iPhone 14' "SWIFT_VERSION=5.3" "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase' \
  29. build \
  30. ) || EXIT_STATUS=$?
  31. exit $EXIT_STATUS