test_quickstart_ftl.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright 2022 Google LLC
  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. # This script is modified from test_quickstart.sh.
  15. # Run a CI `script` phase to build the associated quickstart sample
  16. # and generate build-for-testing artfacts, which can be used to
  17. # run test on Firebase Test Lab.
  18. # The artifacts are under dir: `quickstart-ios/build-for-testing`
  19. set -xeuo pipefail
  20. sample="$1"
  21. language="${2-}"
  22. # Source function to check if CI secrets are available.
  23. source scripts/check_secrets.sh
  24. if check_secrets; then
  25. cd quickstart-ios
  26. if [ "$language" = "swift" ]; then
  27. have_secrets=true SAMPLE="$sample" SWIFT_SUFFIX="Swift" ./scripts/build-for-testing.sh
  28. else
  29. have_secrets=true SAMPLE="$sample" ./scripts/build-for-testing.sh
  30. fi
  31. fi