XNGPodSynchronizer

Build Status Coverage Status

XNGPodSynchronizer reads Podfile.locks of your projects, copies the .podspecs from the CocoaPods master repository and mirrors it to your own git repository (e.g. GitHub Enterprise). This helps you get independent from github.com and avoids the need of cloning the full CocoaPods master repository, which might speed up your builds on CI.

Installation

XNGPodSynchronizer is distributed as a Ruby gem and can be installed using the following command:

$ gem install pod-synchronize

Usage

XNGPodSynchronizer takes a config.yml as an argument an example Yaml would look like this:

# config.yml
---
master_repo: https://github.com/CocoaPods/Specs.git
mirror:
  specs_push_url: [email protected]:pods-mirror/Specs.git
  source_push_url: [email protected]:pods-mirror
  source_clone_url: git://git.hooli.xyz/pods-mirror
  github:
    acccess_token: 0y83t1ihosjklgnuioa
    organisation: pods-mirror
    endpoint: https://git.hooli.xyz/api/v3
podfiles:
  - "https://git.hooli.xyz/ios/moonshot/raw/master/Podfile.lock"
  - "https://git.hooli.xyz/ios/nucleus/raw/master/Podfile.lock"
  - "https://git.hooli.xyz/ios/bro2bro/raw/master/Podfile.lock"
pods:
  - Google-Mobile-Ads-SDK
exclude:
  - BABCropperView
key meaning
master_repo CocoaPods master repository (usually: https://github.com/CocoaPods/Specs.git)
mirror.specs_push_url Git URL used to clone & push the mirrored specs
mirror.source_push_url Git URL used to push the mirrored repositories
mirror.source_clone_url Git URL used to change the download URLs in the podspecs
mirror.github.access_token Access token used to create new repositories
mirror.github.organisation The GitHub organization used for mirrored repositories
mirror.github.endpoint API Endpoint of your GitHub api
podfiles List of Podfile.lock in Plain Text format
pods List of additional Pods you would like to add
exclude List of Pods you would like to exclude

We use Jenkins to run the synchronize process twice daily. To do that use the following command:

$ pod-synchronize synchronize config.yml

Known issues

At the moment this gem only handles git sources correctly. HTTP sources are partly supported (see #12) and svn, hg support is missing.

TODO

  • Support Gitlab #1

Contributing

  1. Fork it ( https://github.com/xing/XNGPodSynchronizer/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Authors

Matthias Männich and Piet Brauer

Copyright (c) 2015 XING AG

Released under the MIT license. For full details see LICENSE included in this distribution.