Class: Pindo::Command::Dev::Pgyercert

Inherits:
Pindo::Command::Dev show all
Includes:
Appselect, XcodeCertHelper
Defined in:
lib/pindo/command/dev/pgyercert.rb

Constant Summary

Constants inherited from Pindo::Command

Pindo::Command::DEFAULT_OPTIONS, Pindo::Command::DEFAULT_ROOT_OPTIONS

Instance Attribute Summary

Attributes inherited from Pindo::Command

#args_help_flag

Class Method Summary collapse

Instance Method Summary collapse

Methods included from XcodeCertHelper

#config_infoplist_cert, #config_project_cert, #create_provisioning_info_array, #create_upload_cert_info, #create_upload_provisioning_info, #get_target_name_map, #modify_entitlements_plist, #modify_info_plist_icloud

Methods included from Appselect

#all_dev_bundleid, #all_itc_bundleid, #all_release_bundleid, #all_tool_bundleid, #deploy_build_setting_json, #dev_build_setting_json, #get_deploy_repo_with_modul_name, #get_deploy_setting_repo, #get_dev_setting_repo, #get_selected_deploy_bundleid, #get_selected_dev_bundleid, #get_setting_bundleid_withdir, #load_setting, #select_main_app

Methods inherited from Pindo::Command

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

#initialize(argv) ⇒ Pgyercert

Returns a new instance of Pgyercert.



31
32
33
34
35
# File 'lib/pindo/command/dev/pgyercert.rb', line 31

def initialize(argv)
  @args_adhoc_flag = argv.flag?('adhoc', false)
  @args_deploy_flag = argv.flag?('deploy', false)
  super 
end

Class Method Details

.optionsObject



24
25
26
27
28
29
# File 'lib/pindo/command/dev/pgyercert.rb', line 24

def self.options
  [
    ['--deploy', '默认用开发的bundle id,使用--deploy设置使用发布bundle id'],
    ['--adhoc', '默认用dev证书,使用--adhoc设置使用adhoc证书'],
  ].concat(super)
end

Instance Method Details

#runObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/pindo/command/dev/pgyercert.rb', line 38

def run

  mainapp_bundleid= nil
  if @args_deploy_flag
    mainapp_bundleid = get_selected_deploy_bundleid()
  else
    mainapp_bundleid = get_selected_dev_bundleid()
  end
  puts "选择使用的bundle id: #{mainapp_bundleid}"

  args_temp = []
  args_temp << mainapp_bundleid
  Pindo::Command::Deploy::Pullconfig::run(args_temp)


  # project_dir = Dir.pwd
  # Dir.chdir(project_dir)
  # config_json_file = File.join(project_dir,"config.json")
  # Debug::modify_cert_with_project(project_dir:project_dir, config_file:config_json_file)

  args_temp = []
  if @args_adhoc_flag
      args_temp << "--adhoc"
  else
      args_temp << "--dev"
  end

  Pindo::Command::Deploy::Cert::run(args_temp)

end