Class: Fastlane::Actions::PilotAction

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

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

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

Class Method Details

.authorsObject



45
46
47
# File 'lib/fastlane/actions/pilot.rb', line 45

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

.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

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/fastlane/actions/pilot.rb', line 49

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