Class: Fastlane::Actions::DefaultPlatformAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/default_platform.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, authors, available_options, 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

.authorObject


32
33
34
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 32

def self.author
  "KrauseFx"
end

.categoryObject


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

def self.category
  :misc
end

.descriptionObject


18
19
20
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 18

def self.description
  "Defines a default platform to not have to specify the platform"
end

.example_codeObject


22
23
24
25
26
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 22

def self.example_code
  [
    'default_platform(:android)'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:


36
37
38
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 36

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object


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

def self.run(params)
  UI.user_error!("You forgot to pass the default platform") if params.first.nil?

  platform = params.first.to_sym

  SupportedPlatforms.verify!(platform)

  Actions.lane_context[SharedValues::DEFAULT_PLATFORM] = platform
end