Class: Fastlane::Actions::AddExtraPlatformsAction

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

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, deprecated_notes, details, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorsObject



24
25
26
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 24

def self.authors
  ["lacostej"]
end

.available_optionsObject



14
15
16
17
18
19
20
21
22
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 14

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :platforms,
                                 optional: false,
                                 type: Array,
                                 default_value: "",
                                 description: "The optional extra platforms to support")
  ]
end

.categoryObject



40
41
42
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 40

def self.category
  :misc
end

.descriptionObject



10
11
12
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 10

def self.description
  "Modify the default list of supported platforms"
end

.example_codeObject



32
33
34
35
36
37
38
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 32

def self.example_code
  [
    'add_extra_platforms(
      platforms: [:windows, :neogeo]
    )'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



28
29
30
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 28

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



4
5
6
7
8
# File 'fastlane/lib/fastlane/actions/add_extra_platforms.rb', line 4

def self.run(params)
  UI.verbose("Before injecting extra platforms: #{Fastlane::SupportedPlatforms.all}")
  Fastlane::SupportedPlatforms.extra = params[:platforms]
  UI.verbose("After injecting extra platforms (#{params[:platforms]})...: #{Fastlane::SupportedPlatforms.all}")
end