Class: Fastlane::Actions::PilotAction

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

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

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

Class Method Details

.authorsObject



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

def self.authors
  ["KrauseFx"]
end

.available_optionsObject



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

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

.categoryObject



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

def self.category
  :beta
end

.descriptionObject



28
29
30
# File 'lib/fastlane/actions/pilot.rb', line 28

def self.description
  "Upload a new binary to iTunes Connect for TestFlight beta testing"
end

.detailsObject



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

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

.example_codeObject



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/fastlane/actions/pilot.rb', line 45

def self.example_code
  [
    'testflight',
    'pilot # alias for "testflight"',
    'testflight(skip_submission: true) # to only upload the build',
    '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:

  • (Boolean)


66
67
68
# File 'lib/fastlane/actions/pilot.rb', line 66

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

.run(values) ⇒ Object



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

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

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

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

    values[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]

    return values if Helper.test?

    Pilot::BuildManager.new.upload(values) # we already have the finished config
  ensure
    FastlaneCore::UpdateChecker.show_update_status('pilot', Pilot::VERSION)
  end
end