release_testing_setup.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright 2020 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. set -x
  15. if [ -f "${HOME}/.cocoapods/repos" ]; then
  16. find "${HOME}/.cocoapods/repos" -type d -maxdepth 1 -exec sh -c 'pod repo remove $(basename {})' \;
  17. fi
  18. git config --global user.email "google-oss-bot@example.com"
  19. git config --global user.name "google-oss-bot"
  20. mkdir -p /tmp/test/firebase-ios-sdk
  21. git clone -b "${podspec_repo_branch}" https://github.com/firebase/firebase-ios-sdk.git "${local_sdk_repo_dir}"
  22. cd "${local_sdk_repo_dir}"
  23. git tag -a "test" -m "release testing"
  24. # Update source and tag, e.g. ":git => 'https://github.com/firebase/firebase-ios-sdk.git'" to
  25. # ":git => /tmp/test/firebase-ios-sdk"
  26. sed -i "" "s/\s*:git.*/:git => '${local_sdk_repo_dir}',/; s/\s*:tag.*/:tag => 'test'/" *.podspec
  27. cd "${GITHUB_WORKSPACE}/ZipBuilder"
  28. swift build
  29. # Update Pod versions.
  30. ./.build/debug/firebase-pod-updater --git-root "${local_sdk_repo_dir}" --releasing-pods "${GITHUB_WORKSPACE}/scripts/create_spec_repo/firebase_sdk.textproto"