-
Notifications
You must be signed in to change notification settings - Fork 0
CocoaPods publication
In short: CocoaPods is a centralized repository consist of library specifications. They're defined in .podspec
files. This has implications for the way how is it used.
Names of pod
subcommands could be a little bit obnoxious, so
calypso.rb
uses different naming. Hopefully, it doesn't make the
things more complex. Let's compare:
calypso.rb command |
pod equivalent |
---|---|
./calypso.rb pod validate --local |
pod lib lint ZalandoCommerceUI.spec \ ZalandoCommerceAPI.spec
|
./calypso.rb pod validate |
pod spec lint ZalandoCommerceAPI.spec pod spec lint ZalandoCommerceUI.spec
|
./calypso.rb pod publish |
pod trunk push ZalandoCommerceAPI.spec pod trunk push ZalandoCommerceUI.spec
|
NOTE: Don't bump version number before the validation, as it will
fail on ZalandoCommerceUI
because it requires ZalandoCommerceAPI
with same version
published.
Pods could be validated in two ways:
-
What's in the working directory - to briefly check changes before you commit:
pod lib lint ...
-
What's in the repo - to check changes before you publish:
pod spec lint ...
It's always called internally by
pod
itself insidepod trunk push
.
Calypso distinguishes them only by --local
parameter. When it exists,
it runs pod lib lint
internally. Otherwise, it runs pod spec lint
.
See Naming for details.
./calypso.rb pod publish [--silent] [--verbose]
Runs pod trunk push
for ZalandoCommerceAPI.podspec
and ZalandoCommerceUI.podspec
, which updates podspecs in CocoaPods repository.
CocoaPods allows to quickly try a demo project from the Pod
without any integration, setups, configurations, creating a projects or so. For end-developer it's basically enough to run pod try
(or a little bit more.
To provide such seamless integration ZalandoCommerceDemoApp project contains Podfile
,
which is utilized internally by pod try
command only.
Podfile
does not contain dependencies only, but also have code to modify ZalandoCommerceDemoApp
project to remove manual dependencies that are used on daily basis during the development. It's correct, as it happen only in local
copy of the project prepared by pod try
.
Additionally, Podfile
conflicts with behaviour of Buddybuild, which automatically runs pod install
, when the file is found, but it's handled – see more about it in Buddybuild#cocoapods-and-carthage
Any new collaborator needs to register themselves in Cocoapods repository (once):
pod trunk register YOUR_EMAIL 'YOUR_NAME' --description='YOUR_WORKSTATION'
And click confirmation email.
To allow other developers publish podspecs you need to add them as owners:
pod trunk add-owner ZalandoCommerceAPI COLLABOLATOR_EMAIL
pod trunk add-owner ZalandoCommerceUI COLLABOLATOR_EMAIL
☎️ Questions, problems, new ideas? Please email us or create an issue.
© 2016-2017 Zalando SE