Class: Fastlane::Actions::UploadPgyAction

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

Overview

上传蒲公英

Class Method Summary collapse

Class Method Details

.available_optionsObject



33
34
35
# File 'lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb', line 33

def self.available_options
  []
end

.categoryObject



41
42
43
# File 'lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb', line 41

def self.category
  :building
end

.descriptionObject



29
30
31
# File 'lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb', line 29

def self.description
  "上传蒲公英"
end

.is_supported?(platform) ⇒ Boolean



37
38
39
# File 'lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb', line 37

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

.run(params) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb', line 9

def self.run(params)
  UI.message("*************| 开始上传蒲公英 |*************")

  unless CommonHelper.is_validate_string(Environment.pgy_api_key)
    UI.message("*************| 没有配置 pgy_api_key |*************")
    return
  end

  ipa_path = params[:ipa_path] || ""

  pgyinfo = PgyerAction.run(
    ipa: ipa_path,
    api_key: Environment.pgy_api_key,
    password: Environment.pgy_password,
    install_type: "2"
  )

  return pgyinfo
end