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, sh, step_text

Class Method Details

.authorObject



53
54
55
# File 'lib/fastlane/actions/produce.rb', line 53

def self.author
  "KrauseFx"
end

.available_optionsObject



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

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

.descriptionObject



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

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

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/fastlane/actions/produce.rb', line 57

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

.outputObject



47
48
49
50
51
# File 'lib/fastlane/actions/produce.rb', line 47

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

def self.run(params)
  require 'produce'
  require 'produce/options'

  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



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

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