-
Notifications
You must be signed in to change notification settings - Fork 3
Simple Fastlane setup with plugins
See https://docs.fastlane.tools for full details on installing and setting up Fastlane for your project. A Gemfile is required to use Fastlane with plugins. For best results, install Fastlane using a Gemfile.
-
A working Ruby development environment.
At a minimum, this requires the
bundlecommand to be in yourPATH.For this plugin, the system Ruby will usually be sufficient. However, for best results use RVM or rbenv to manage your Ruby environment any time you work with Ruby. See the RVM Cheat Sheet in this wiki to get started quickly with RVM.
-
Add a file named
Gemfileto the root of your project repository with these contents:source "https://rubygems.org" gem "fastlane"
-
Run
bundle install. This generates a file calledGemfile.lockin the same directory. Be sure to commit bothGemfileandGemfile.lockto SCM. -
Now run all Fastlane commands using
bundle exec fastlane, e.g.bundle exec fastlane lanes. -
Add Fastlane to your project. There are two options. Both options create a
fastlanesubdirectory in your project. Be sure to commit the contents of this directory to SCM.a) Run
bundle exec fastlane init. This command is aimed at setting up a production app to build releases. It may not be the most convenient way to start in other cases.b) Copy the
fastlanesubdirectory from this repo:git clone https://github.com/BranchMetrics/fastlane-plugin-branch cp -r fastlane-plugin-branch/fastlane /path/to/myapp
You can modify the
Fastfileas you see fit. -
Run
bundle exec fastlane add_plugin branch. This modifies theGemfile,Gemfile.lockandfastlane/Pluginfilein the repo. All plugins in yourPluginfileare now available. -
Edit the
fastlane/Branchfilefor your project to use the appropriate Branch parameters.