We've added hints of fastlane to our apps at different rates, Eidolon uses fastlane for everything but Eigen/Energy/Emergence have been pretty slow on the uptake, though they have more complicated setups, being App Store apps.
When Felix announced match this week, I felt like he tackled a problem we face in our small dev team. I integrated this, only to find that it could also fix my problems with deployment. The rest of this post goes into the "how I did this." You can also cheat and look at the commits directly.
First up, a TLDR for match. match is a tool that keeps all of your code-signing setup in a private git repo. We currently keep them in a shared 1Password vault. By switching to using a private git repo we can can use our existing GitHub authentication for CI to provide access to the certificates for signing on circle.
I wanted to lower the barrier for us shipping betas, so I opted to add another build step in the CI process. This step checks what branch is it, and if it's the beta branch, grab the certs, then deploy.
make certs is really simple, it runs:
bundle exec match appstore --readonly which and pulls metadata from a Matchfile. This means we can sign app store builds on CI.
If you don't know what the
bundle exec prefix is, I'd recommend reading my guide on the CocoaPods website for Gemfiles.
The next step is generating an ipa, we do this with gym via
make ipa which looks like this:
It executes some make tasks to ensure we know what git commit each build is, and we use the date to provide a faux-semver for apps.
make distribute is a pretty easy one, we generate a CHANGELOG via Ruby, then run the command
bundle exec pilot upload -i build/Artsy.ipa, it will ship it to iTunes Connect after configuration from the Appfile. This is great, but it goes one better. It will, by default, run a synchronous check for whether the App has finished processing.