tmspzz/Rome

Carthage 每一次會Chackout 成個framework project 再build, 當有framework更新時, 團隊中每人 carthage update 都會將個framework重新build 一次, 這個過程十分浪費時間.

Rome 可以將build完的framework cache底,再放去特定位置,團隊中其他人要更新時只需下載已build好的framework即可,大大節省時間.


https://whimsical.com/carthage-caching-EWx3UxJgXHGJF8DFMm7nPY

Produer: build ios framework 並上傳到 cache folder, Romefile 用來設定folder path等配置

carthage.sh update --platform ios --cache-builds && rome upload --platform ios --romefile ../Romefile

Consumer : 只更新 ****carthage狀態並從cache folder下載已build好的framework

carthage.sh update --platform ios --no-build && rome download --platform ios --romefile ../Romefile

Romefile 參考

cache:
  local: ~/Library/Caches/Rome
repositoryMap:
- RxSwift:
  - name: RxSwift
  - name: RxCocoa
  - name: RxRelay
  - name: RxBlocking
  - name: RxTest
- lottie-ios:
  - name: Lottie
- keychain-swift:
  - name: KeychainSwift
- keychain-swift:
  - name: KeychainSwift
- IQKeyboardManager:
  - name: IQKeyboardManager
  - name: IQKeyboardManagerSwift
- Kingfisher:
  - name: Kingfisher
  - name: KingfisherSwiftUI
- Moya:
  - name: Moya
  - name: ReactiveMoya
  - name: RxMoya

注意事項

  1. 有些Project 多於一個framework 或名稱不相同,這個情況需要在 Romefile 手動定義,默認只會上傳名稱一樣的framework, 例如 RxSwift

    repositoryMap:
    - RxSwift:
      - name: RxSwift
      - name: RxCocoa
      - name: RxRelay
      - name: RxBlocking
      - name: RxTest