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, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorObject



38
39
40
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 38

def self.author
  "KrauseFx"
end

.categoryObject



34
35
36
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 34

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



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

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

.is_supported?(platform) ⇒ Boolean

Returns:



42
43
44
# File 'fastlane/lib/fastlane/actions/default_platform.rb', line 42

def self.is_supported?(platform)
  true
end

.outputObject



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

def self.output
  [
    ['DEFAULT_PLATFORM', 'The default platform']
  ]
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