Class: Fastlane::Actions::RustoreDeveloperUploadAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



16
17
18
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 16

def self.authors
  ["RimiX2"]
end

.available_optionsObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 29

def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :package,
                                   env_name: "RUSTORE_PACKAGE_NAME",
                                   description: "Android app package name (FQDN)",
                                   optional: false,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :token,
                                   description: "Access token",
                                   optional: false,
                                   sensitive: true,
                                   default_value: Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_ACCESS_TOKEN],
                                   verify_block: proc do |value|
                                     UI.user_error!("No access token given, pass using `token: 'token_value'`") unless value && !value.empty?
                                   end,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :version,
                                   description: "Version ID",
                                   optional: true,
                                   type: String,
                                   default_value: Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_DRAFT_VERSION]),
      FastlaneCore::ConfigItem.new(key: :file_path,
                                   description: "File path of APK artifact",
                                   optional: false ,
                                   type: String)
  ]
end

.descriptionObject



12
13
14
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 12

def self.description
  "RUSTORE: Upload an APK package"
end

.detailsObject



24
25
26
27
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 24

def self.details
  # Optional:
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
60
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 57

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

.return_valueObject



20
21
22
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 20

def self.return_value
  "Was operation successfull? (true|false)"
end

.run(params) ⇒ Object



8
9
10
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb', line 8

def self.run(params)
  return Helper::RustoreDeveloperHelper.uploadAPK(params[:token], params[:package], params[:version], params[:file_path])
end