setup_spm_tests.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # Copyright 2021 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. # Point SPM CI to the tip of main of https://github.com/google/GoogleAppMeasurement
  16. # so that the release process can defer publishing the GoogleAppMeasurement tag
  17. # until after testing.
  18. # For example: Change `exact: "8.3.1"` to `branch: "main"`
  19. sed -i '' 's#exact:[[:space:]]*"[0-9.]*"#branch: "main"#' Package.swift
  20. # Move schemes into place to run Swift Package Manager tests
  21. # These cannot be stored in the correct location because they cause
  22. # clutter for SDK clients.
  23. # Details in https://github.com/firebase/firebase-ios-sdk/issues/8167 and
  24. # https://forums.swift.org/t/swiftpm-and-library-unit-testing/26255/21
  25. mkdir -p .swiftpm/xcode/xcshareddata/xcschemes
  26. cp scripts/spm_test_schemes/* .swiftpm/xcode/xcshareddata/xcschemes/