Class: Fastlane::Actions::FastlaneVersionAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/fastlane_version.rb

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, available_options, details, output, sh

Class Method Details

.authorObject



23
24
25
# File 'lib/fastlane/actions/fastlane_version.rb', line 23

def self.author
  "KrauseFx"
end

.descriptionObject



27
28
29
# File 'lib/fastlane/actions/fastlane_version.rb', line 27

def self.description
  "Verifies the minimum fastlane version required"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/fastlane/actions/fastlane_version.rb', line 31

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/fastlane/actions/fastlane_version.rb', line 8

def self.run(params)
  defined_version = ((Gem::Version.new(params.first) if params.first) rescue nil)
  raise "Please pass minimum fastlane version as parameter to fastlane_version".red unless defined_version

  if Gem::Version.new(Fastlane::VERSION) < defined_version
    raise "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}. Please update using `sudo gem update fastlane`.".red
  end

  Helper.log.info "fastlane version valid"
end

.step_textObject



19
20
21
# File 'lib/fastlane/actions/fastlane_version.rb', line 19

def self.step_text
  "Verifying required fastlane version"
end