Class: Fastlane::Actions::TeamIdAction

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



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

def self.author
  "KrauseFx"
end

.descriptionObject



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

def self.description
  "Specify the Team ID you want to use for the Apple Developer Portal"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/fastlane/actions/team_id.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 'lib/fastlane/actions/team_id.rb', line 7

def self.run(params)
  params = nil unless params.kind_of? Array
  team = (params || []).first
  raise "Please pass your Team ID (e.g. team_id 'Q2CBPK58CA')".red unless team.to_s.length > 0

  Helper.log.info "Setting Team ID to '#{team}' for all build steps"

  [:CERT_TEAM_ID, :SIGH_TEAM_ID, :PEM_TEAM_ID, :PRODUCE_TEAM_ID, :SIGH_TEAM_ID, :FASTLANE_TEAM_ID].each do |current|
    ENV[current.to_s] = team
  end
end