build_all_environments.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env bash
  2. # Copyright 2019 Google
  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. # The script uses combinations of Gemfile/Podfile to validate Firebase
  16. # compatibility with Cocoapods versions and settings.
  17. # To add a new configuration:
  18. # - create a new directory in `CocoapodsIntegrationTest/TestEnvironments`
  19. # - place Gemfile and Pod file to the created directory
  20. # The script attempts to build the test project for each configuration from
  21. # `CocoapodsIntegrationTest/TestEnvironments`.
  22. set -euo pipefail
  23. scriptsDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
  24. buildScripts="$( realpath ${scriptsDir}/build_with_environment.sh )"
  25. environmentsDir="$( realpath ${scriptsDir}/../TestEnvironments )"
  26. echo "Dir: ${environmentsDir}"
  27. pushd "${environmentsDir}"
  28. for environmentDir in `find . -type d -mindepth 1 -maxdepth 1`
  29. do
  30. echo ""
  31. echo "--- Build for environment from ${environmentDir} ---"
  32. source $buildScripts --gemfile="${environmentDir}/Gemfile" --podfile="${environmentDir}/Podfile"
  33. echo "--- Build for environment from ${environmentDir} finished ---"
  34. done
  35. popd