Class: Fastlane::Actions::SupplyAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/supply.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, sample_return_value, sh, step_text

Class Method Details

.authorsObject



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

def self.authors
  ["KrauseFx"]
end

.available_optionsObject



38
39
40
41
42
# File 'lib/fastlane/actions/supply.rb', line 38

def self.available_options
  require 'supply'
  require 'supply/options'
  Supply::Options.available_options
end

.categoryObject



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

def self.category
  :production
end

.descriptionObject



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

def self.description
  "Upload metadata, screenshots and binaries to Google Play"
end

.detailsObject



34
35
36
# File 'lib/fastlane/actions/supply.rb', line 34

def self.details
  "More information: https://github.com/fastlane/fastlane/tree/master/supply"
end

.example_codeObject



58
59
60
61
62
# File 'lib/fastlane/actions/supply.rb', line 58

def self.example_code
  [
    'supply'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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

.outputObject



44
45
# File 'lib/fastlane/actions/supply.rb', line 44

def self.output
end

.return_valueObject



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

def self.return_value
end

.run(params) ⇒ Object



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

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

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

    all_apk_paths = Actions.lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] || []
    if all_apk_paths.length > 1
      params[:apk_paths] ||= all_apk_paths
    else
      params[:apk] ||= Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
    end

    Supply.config = params # we already have the finished config

    Supply::Uploader.new.perform_upload
  ensure
    FastlaneCore::UpdateChecker.show_update_status('supply', Supply::VERSION)
  end
end