Class: Pindo::Command::Deploy

Inherits:
Pindo::Command show all
Defined in:
lib/pindo/command/deploy.rb,
lib/pindo/command/deploy/iap.rb,
lib/pindo/command/deploy/pem.rb,
lib/pindo/command/deploy/tag.rb,
lib/pindo/command/deploy/cert.rb,
lib/pindo/command/deploy/build.rb,
lib/pindo/command/deploy/check.rb,
lib/pindo/command/deploy/fabric.rb,
lib/pindo/command/deploy/itcapp.rb,
lib/pindo/command/deploy/resign.rb,
lib/pindo/command/deploy/itcinfo.rb,
lib/pindo/command/deploy/quswark.rb,
lib/pindo/command/deploy/bundleid.rb,
lib/pindo/command/deploy/quswauth.rb,
lib/pindo/command/deploy/reportbug.rb,
lib/pindo/command/deploy/uploadipa.rb,
lib/pindo/command/deploy/configproj.rb,
lib/pindo/command/deploy/getitcinfo.rb,
lib/pindo/command/deploy/initconfig.rb,
lib/pindo/command/deploy/pullconfig.rb,
lib/pindo/command/deploy/pushconfig.rb,
lib/pindo/command/deploy/confusecode.rb,
lib/pindo/command/deploy/confuseproj.rb,
lib/pindo/command/deploy/updateconfig.rb

Defined Under Namespace

Classes: Build, Bundleid, Cert, Check, Configproj, Confusecode, Confuseproj, Fabric, Getitcinfo, Iap, Initconfig, Itcapp, Itcinfo, Pem, Pullconfig, Pushconfig, Quswark, Quswauth, Reportbug, Resign, Tag, Updateconfig, Uploadipa

Constant Summary

Constants inherited from Pindo::Command

DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS

Instance Attribute Summary

Attributes inherited from Pindo::Command

#args_help_flag

Instance Method Summary collapse

Methods inherited from Pindo::Command

#initialize, options, run, #validate!

Methods included from Funlog::Mixin

#pindo_log_instance

Methods included from Pindoconfig::Mixin

#pindo_single_config

Methods included from Githelper

#add_branch, #add_tag, #add_tag_with_check, #clone_clang_repo, #clone_devclang_repo, #clone_pindo_common_config_repo, #clone_pindo_env_config_repo, #clong_buildconfig_repo, #get_repo_base_name, #getcode_to_dir, #git_addpush_repo, #git_latest_commit_id, #local_branch_exists?, #local_tag_exists?, #prepare_gitenv, #process_need_add_files, #remote_branch_exists?, #remote_tag_exists?, #remove_branch, #remove_tag

Methods included from Executable

capture_command, #executable, execute_command, which, which!

Constructor Details

This class inherits a constructor from Pindo::Command

Instance Method Details

#get_create_cert_match_values(apple_id: nil, bundle_id_array: nil, build_type: nil, renew_flag: false) ⇒ Object



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/pindo/command/deploy/cert.rb', line 137

def get_create_cert_match_values(apple_id:nil, bundle_id_array:nil, build_type:nil, renew_flag:false)

  if build_type.eql?("appstore") && (apple_id.eql?(pindo_single_config.demo_apple_id))
    raise Informative, "#{apple_id} 是测试账号,不能创建appstore证书!!!"
  end
  if !build_type.eql?("appstore") && !apple_id.eql?(pindo_single_config.demo_apple_id)
    raise Informative, "账号#{apple_id} 不能创建dev或者adhoc证书!!!"
  end

  git_url = pindo_single_config.deploy_cert_giturl
  if @apple_id.eql?(pindo_single_config.demo_apple_id)
    git_url = pindo_single_config.dev_cert_giturl
  end

  force_for_new_devices_flag = true
  if build_type.eql?("appstore")
    force_for_new_devices_flag = false
  end

  platform_type = "ios"
  if @config_json && @config_json['project_info'] && @config_json['project_info']['build_type'].include?("MacOS")
    platform_type = "macos"
  end

  values = {
    username:apple_id,
    app_identifier: bundle_id_array,
    type: build_type,
    keychain_password:"goodcert1",
    git_url: git_url,
    readonly:!renew_flag,
    force:renew_flag,
    clone_branch_directly:!renew_flag,
    include_mac_in_profiles:true,
    include_all_certificates:true,
    generate_apple_certs:true,
    shallow_clone:!renew_flag,
    git_branch: apple_id,
    platform:platform_type,
    force_for_new_devices:force_for_new_devices_flag
  }
  return values
end