FirebasePod.swift 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  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. */
  16. import Foundation
  17. import ManifestReader
  18. /// Updates the Firebase Pod with a release's version set.
  19. struct FirebasePod {
  20. /// Relevant paths in the filesystem to build the release directory.
  21. struct FilesystemPaths {
  22. // MARK: - Required Paths
  23. /// A file URL to a textproto with the contents of a `FirebasePod_Release` object. Used to verify
  24. /// expected version numbers.
  25. let currentReleasePath: URL
  26. /// A file path to the path of the checked out git repo.
  27. let gitRootPath: String
  28. }
  29. /// Paths needed throughout the process of packaging the Zip file.
  30. private let paths: FilesystemPaths
  31. /// Default initializer. If allPodsPath and currentReleasePath are provided, it will also verify
  32. /// that the
  33. ///
  34. /// - Parameters:
  35. /// - paths: Paths that are needed throughout the process of packaging the Zip file.
  36. init(paths: FilesystemPaths) {
  37. self.paths = paths
  38. }
  39. }