class Escalator::Command::Resign

Attributes

apple_id[R]
bundle_identifier[R]
bundle_name[R]
bundle_version[R]
display_name[R]
executable_name[R]
iconAssets_path[R]
ipaPaths[R]
issuer_id[R]
key_id[R]
keyfile_path[R]
short_version[R]
user_password[R]

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/escalator/command/resign.rb, line 81
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", ""
  @apple_id = argv.option "apple-id", ""
  @user_password = argv.option "user-password", ""
  @bundle_identifier = argv.option "bundle-identifier", ""
  @short_version = argv.option "short-version", ""
  @bundle_version = argv.option "bundle-version", ""
  @bundle_name = argv.option "bundle-name", ""
  @display_name = argv.option "display-name", ""
  @executable_name = argv.option "executable-name", ""
  @iconAssets_path = argv.option "iconAssets-path", ""
  super
end
options() click to toggle source
Calls superclass method Escalator::Command::options
# File lib/escalator/command/resign.rb, line 64
def self.options
  [
    ["--key-id=id", "id 为 Appstore Connect 用户访问密钥的 keyId"],
    ["--issuer-id=id", "id 为 Appstore Connect 用户访问密钥的 issuerId"],
    ["--keyfile-path=path", "path 为 Appstore Connect 用户访问密钥的 .p8 文件保存路径"],
    ["--user-password=password", "password 为当前电脑用户的访问密码"],
    ["--bundle-identifier=identifier", "identifier 为新的唯一标识符"],
    ["--short-version=version", "version 为新的版本号"],
    ["--bundle-version=version", "version 为新的 BuildID, 同一账号下处理多 IPA, 会自动叠加"],
    ["--apple-id=id", "id 为对应的苹果开发者账户, 如果含有 APP GROUP 推荐添加此字段, 默认: 无"],
    ["--bundle-name=name", "name 为新的包名, 默认: 不变"],
    ["--display-name=name", "name 为新的 APP 名称, 默认: 不变"],
    ["--executable-name=name", "name 为新的二进制文件名, 默认: 不变"],
    ["--iconAssets-path=path", "path 为包含新 AppIcon 的 .xcassets 资源文件路径, 默认: 无"]
  ].concat super
end

Public Instance Methods

help!(error_message = nil) click to toggle source
# File lib/escalator/command/resign.rb, line 126
def help!(error_message = nil)
  invoked_command_class.help!(error_message, Help)
end
run() click to toggle source
# File lib/escalator/command/resign.rb, line 130
def run
  Escalator::Resign.run self
end
validate!() click to toggle source
Calls superclass method
# File lib/escalator/command/resign.rb, line 98
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 user_password.empty?
    help! "未检测到 --user-password 参数"
  end
  if bundle_identifier.empty?
    help! "未检测到 --bundle-identifier 参数"
  end
  if short_version.empty?
    help! "未检测到 --short-version 参数"
  end
  if bundle_version.empty?
    help! "未检测到 --bundle-version 参数"
  end
end