Class: Fastlane::Actions::TeamNameAction

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



23
24
25
# File 'fastlane/lib/fastlane/actions/team_name.rb', line 23

def self.author
  "KrauseFx"
end

.categoryObject



37
38
39
# File 'fastlane/lib/fastlane/actions/team_name.rb', line 37

def self.category
  :misc
end

.descriptionObject



19
20
21
# File 'fastlane/lib/fastlane/actions/team_name.rb', line 19

def self.description
  "Set a team to use by its name"
end

.example_codeObject



31
32
33
34
35
# File 'fastlane/lib/fastlane/actions/team_name.rb', line 31

def self.example_code
  [
    'team_name("Felix Krause")'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



27
28
29
# File 'fastlane/lib/fastlane/actions/team_name.rb', line 27

def self.is_supported?(platform)
  platform == :ios
end

.run(params) ⇒ Object



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

def self.run(params)
  params = nil unless params.kind_of?(Array)
  team = (params || []).first
  UI.user_error!("Please pass your Team Name (e.g. team_name 'Felix Krause')") unless team.to_s.length > 0

  UI.message("Setting Team Name to '#{team}' for all build steps")

  [:FASTLANE_TEAM_NAME, :PRODUCE_TEAM_NAME].each do |current|
    ENV[current.to_s] = team
  end
end