Class: Fastlane::Actions::MinFastlaneVersionAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, authors, available_options, deprecated_notes, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?
Class Method Details
.author ⇒ Object
27
28
29
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 27
def self.author
"KrauseFx"
end
|
.category ⇒ Object
48
49
50
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 48
def self.category
:misc
end
|
.description ⇒ Object
31
32
33
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 31
def self.description
"Verifies the minimum fastlane version required"
end
|
.details ⇒ Object
41
42
43
44
45
46
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 41
def self.details
[
"Add this to your `Fastfile` to require a certain version of _fastlane_.",
"Use it if you use an action that just recently came out and you need it."
].join("\n")
end
|
.example_code ⇒ Object
35
36
37
38
39
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 35
def self.example_code
[
'min_fastlane_version("1.50.0")'
]
end
|
.is_supported?(platform) ⇒ Boolean
52
53
54
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 52
def self.is_supported?(platform)
true
end
|
.run(params) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 7
def self.run(params)
params = nil unless params.kind_of?(Array)
value = (params || []).first
defined_version = Gem::Version.new(value) if value
UI.user_error!("Please pass minimum fastlane version as parameter to min_fastlane_version") unless defined_version
if Gem::Version.new(Fastlane::VERSION) < defined_version
FastlaneCore::UpdateChecker.show_update_message('fastlane', Fastlane::VERSION)
error_message = "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}."
UI.user_error!(error_message)
end
UI.message("Your fastlane version #{Fastlane::VERSION} matches the minimum requirement of #{defined_version} ✅")
end
|
.step_text ⇒ Object
23
24
25
|
# File 'fastlane/lib/fastlane/actions/min_fastlane_version.rb', line 23
def self.step_text
"Verifying fastlane version"
end
|