class Escalator::Command::Upload

Attributes

bundle_identifier[R]
ipaPaths[R]
issuer_id[R]
key_id[R]
keyfile_path[R]

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/escalator/command/upload.rb, line 55
def initialize argv
  @ipaPaths = argv.arguments!.select { |arg| !arg.empty? }
  @key_id = argv.option "key-id", ""
  @issuer_id = argv.option "issuer-id", ""
  @keyfile_path = argv.option "keyfile-path", ""
  @bundle_identifier = argv.option "bundle-identifier", ""
  super
end
options() click to toggle source
Calls superclass method Escalator::Command::options
# File lib/escalator/command/upload.rb, line 46
def self.options
  [
    ["--key-id=id", "id 为 Appstore Connect 用户访问密钥的 keyId"],
    ["--issuer-id=id", "id 为 Appstore Connect 用户访问密钥的 issuerId"],
    ["--keyfile-path=path", "path 为 Appstore Connect 用户访问密钥的 .p8 文件保存路径"],
    ["--bundle-identifier=identifier", "identifier 为上传账户下对应唯一标识符"]
  ].concat super
end

Public Instance Methods

help!(error_message = nil) click to toggle source
# File lib/escalator/command/upload.rb, line 83
def help!(error_message = nil)
  invoked_command_class.help!(error_message, Help)
end
run() click to toggle source
# File lib/escalator/command/upload.rb, line 87
def run
  Escalator::Upload.run self
end
validate!() click to toggle source
Calls superclass method
# File lib/escalator/command/upload.rb, line 64
def validate!
  super
  if ipaPaths.empty?
    help! "未检测到 IPAPATH 参数"
  end
  if key_id.empty?
    help! "未检测到 --key-id 参数"
  end
  if issuer_id.empty?
    help! "未检测到 --issuer-id 参数"
  end
  if keyfile_path.empty?
    help! "未检测到 --keyfile-path 参数"
  end
  if bundle_identifier.empty?
    help! "未检测到 --bundle-identifier 参数"
  end
end