Class: Fastlane::Actions::DeliverAction

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

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, lane_context, method_missing, other_action, output, return_value, sample_return_value, sh, step_text

Class Method Details

.authorObject



46
47
48
# File 'lib/fastlane/actions/deliver.rb', line 46

def self.author
  "KrauseFx"
end

.available_optionsObject



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

def self.available_options
  require "deliver"
  require "deliver/options"
  FastlaneCore::CommanderGenerator.new.generate(Deliver::Options.available_options)
end

.categoryObject



64
65
66
# File 'lib/fastlane/actions/deliver.rb', line 64

def self.category
  :production
end

.descriptionObject



24
25
26
# File 'lib/fastlane/actions/deliver.rb', line 24

def self.description
  "Uses deliver to upload new app metadata and builds to iTunes Connect"
end

.detailsObject



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/fastlane/actions/deliver.rb', line 28

def self.details
  [
    "Using _deliver_ after _gym_ and _snapshot_ will automatically upload the",
    "latest ipa and screenshots with no other configuration",
    "",
    "If you don't want a PDF report for App Store builds, use the `:force` option.",
    "This is useful when running _fastlane_ on your Continuous Integration server: `deliver(force: true)`",
    "If your account is on multiple teams and you need to tell the `iTMSTransporter`",
    "which 'provider' to use, you can set the `itc_provider` option to pass this info."
  ].join("\n")
end

.example_codeObject



54
55
56
57
58
59
60
61
62
# File 'lib/fastlane/actions/deliver.rb', line 54

def self.example_code
  [
    'deliver(
      force: true, # Set to true to skip PDF verification
      itc_provider: "abcde12345" # pass a specific value to the iTMSTransporter -itc_provider option

    )'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/fastlane/actions/deliver.rb', line 50

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.run(config) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/fastlane/actions/deliver.rb', line 7

def self.run(config)
  require 'deliver'

  begin
    FastlaneCore::UpdateChecker.start_looking_for_update('deliver') unless Helper.is_test?

    config.load_configuration_file("Deliverfile")
    config[:screenshots_path] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] if Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
    config[:ipa] = Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] if Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]

    return config if Helper.test?
    Deliver::Runner.new(config).run
  ensure
    FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
  end
end