How to use a specific version of fastlane?

ruby
gem
fastlane

#1

If you use our fastlane step to run your fastlane config, and you want to use a specific version of fastlane:

  1. Add a Script step right before the fastlane step
  2. Specify this as the content of the Script step:
set -ex
gem uninstall fastlane --all --executables
gem install fastlane --version 2.18.3 --no-document
  1. Make sure that the Should update fastlane gem before run? (update_fastlane) option of the fastlane step is set to false.

That’s all. Of course, replace 2.18.3 with the version you want to use :wink:


Using a Gemfile & Gemfile.lock: if you use our fastlane step this is mentioned in the description of the step:

If Gemfile exists in the work_dir directory, fastlane will be used by bundle install && bundle exec.

If you’re familiar with Ruby projects and with how the Gemfile & Gemfile.lock works this is probably the best solution, and it’s pretty much 0 effort.

But if you don’t use a Gemfile & bundle exec on your Mac to run fastlane then the Script based solution above is probably easier to maintain. Up to you of course, the step can work with either solution :wink:

Happy Building!


Step Fastlane uses an unwanted version
Step Fastlane uses an unwanted version
Need Fastlane v.2.43 for HockeyApp fix (fastlane)
Infinite build / hanging build issue, fastlane sh & envman
Xcodebuild -showBuildSettings timed-out
Need Fastlane v.2.43 for HockeyApp fix (fastlane)
#2

How to use always the latest version of fastlane?

  1. Make sure you don’t have a Gemfile & Gemfile.lock in your repository, or if you have to then make sure fastlane is not listed on either
  2. After this enable the Should update fastlane gem before run? option of the fastlane step (set it to true)

How to upgrade the preinstalled fastlane version (e.g. if you don’t use the fastlane step)?

Add a Script step to your Workflow, before fastlane would be used (can be the very first step of the workflow), with the content:

#!/bin/bash
set -ex

gem install fastlane -NV

#3

Hi There,
This regarding the maintaining same Fastlane version over the period of time. I mean can we install specific version as I see Fastlane gets new version everytime

https://rubygems.org/gems/fastlane/versions/


#4

Yes, see the initial post at the top here How to use a specific version of fastlane? :slight_smile:


#5

hi viktorbenei,

i am new to the Fastlane, i am not getting what is the fastlane step here , and where we need to add a script to execute ,

i have installed ruby 2.2.0 and tried to install the fastlane with gem install fastlane 2.73.0, still it is installaning latest version fastlane .

can you explain in detail how to install specific version of fastlane ?


#6

Do you mean on your own Mac? Or on bitrise.io?

Did you follow the steps at :point_up: (How to use a specific version of fastlane?)

Make sure that the Should update fastlane gem before run? (update_fastlane) option of the fastlane step is set to false.