Class: Fastlane::Actions::UploadToTestflightAction

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

Direct Known Subclasses

PilotAction, TestflightAction

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, deprecated_notes, 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

.authorsObject



58
59
60
# File 'fastlane/lib/fastlane/actions/upload_to_testflight.rb', line 58

def self.authors
  ["KrauseFx"]
end

.available_optionsObject



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

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

.categoryObject



54
55
56
# File 'fastlane/lib/fastlane/actions/upload_to_testflight.rb', line 54

def self.category
  :beta
end

.descriptionObject



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

def self.description
  "Upload new binary to App Store Connect for TestFlight beta testing (via _pilot_)"
end

.detailsObject



27
28
29
30
31
32
# File 'fastlane/lib/fastlane/actions/upload_to_testflight.rb', line 27

def self.details
  [
    "More details can be found on https://docs.fastlane.tools/actions/pilot/.",
    "This integration will only do the TestFlight upload."
  ].join("\n")
end

.example_codeObject



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'fastlane/lib/fastlane/actions/upload_to_testflight.rb', line 40

def self.example_code
  [
    'upload_to_testflight',
    'testflight # alias for "upload_to_testflight"',
    'pilot # alias for "upload_to_testflight"',
    'upload_to_testflight(skip_submission: true) # to only upload the build',
    'upload_to_testflight(
      username: "[email protected]",
      app_identifier: "com.krausefx.app",
      itc_provider: "abcde12345" # pass a specific value to the iTMSTransporter -itc_provider option
    )'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



62
63
64
# File 'fastlane/lib/fastlane/actions/upload_to_testflight.rb', line 62

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

.run(values) ⇒ Object



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

def self.run(values)
  require 'pilot'
  require 'pilot/options'

  changelog = Actions.lane_context[SharedValues::FL_CHANGELOG]
  values[:changelog] ||= changelog if changelog

  values[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
  values[:ipa] = File.expand_path(values[:ipa]) if values[:ipa]

  return values if Helper.test?

  Pilot::BuildManager.new.upload(values) # we already have the finished config
end