Class: Fastlane::Actions::ProduceAction

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, details, return_value, sh, step_text

Class Method Details

.authorObject



51
52
53
# File 'lib/fastlane/actions/produce.rb', line 51

def self.author
  "KrauseFx"
end

.available_optionsObject



40
41
42
43
# File 'lib/fastlane/actions/produce.rb', line 40

def self.available_options
  require 'produce'
  Produce::Options.available_options
end

.descriptionObject



29
30
31
# File 'lib/fastlane/actions/produce.rb', line 29

def self.description
  "Creates the given application on iTC and the Dev Portal if necessary"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/fastlane/actions/produce.rb', line 55

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

.outputObject



45
46
47
48
49
# File 'lib/fastlane/actions/produce.rb', line 45

def self.output
  [
    ['PRODUCE_APPLE_ID', 'The Apple ID of the newly created app. You probably need it for `deliver`']
  ]
end

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/fastlane/actions/produce.rb', line 8

def self.run(params)
  require 'produce'

  return if Helper.test?

  begin
    FastlaneCore::UpdateChecker.start_looking_for_update('produce')
    Produce.config = params # we alread have the finished config

    Dir.chdir(FastlaneFolder.path || Dir.pwd) do
      # This should be executed in the fastlane folder
      apple_id = Produce::Manager.start_producing.to_s

      Actions.lane_context[SharedValues::PRODUCE_APPLE_ID] = apple_id
      ENV['PRODUCE_APPLE_ID'] = apple_id
    end
  ensure
    FastlaneCore::UpdateChecker.show_update_status('produce', Produce::VERSION)
  end
end

Instance Method Details

#detailsObject



33
34
35
36
37
38
# File 'lib/fastlane/actions/produce.rb', line 33

def details
  [
    'For more information about produce, visit its GitHub page:',
    'https://github.com/fastlane/fastlane/tree/master/produce'
  ].join(' ')
end