Class: Fastlane::Actions::DefaultPlatformAction

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

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, available_options, details, output, return_value, sh, step_text

Class Method Details

.authorObject



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

def self.author
  "KrauseFx"
end

.descriptionObject



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

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

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/fastlane/actions/default_platform.rb', line 26

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
16
# File '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