Class: YKCitool::Certificate

Inherits:
SubCommandBase show all
Defined in:
lib/actions/certificate.rb

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, exit_on_failure?, subcommand_prefix

Instance Method Details

#list_configObject



10
11
12
# File 'lib/actions/certificate.rb', line 10

def list_config()
  self.list_details_execute()
end

#sync_apple_profileObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/actions/certificate.rb', line 20

def sync_apple_profile()
  puts "options:#{options}"
  arr = options[:bundle_ids]
  if arr != nil && arr.count > 0
    str = arr.join(",")
    options[:bundle_ids] = str
  end

  if options[:workspace].blank? == false
    Dir.chdir(Dir.pwd) do
      options[:workspace] = File.expand_path(options[:workspace])
    end
  end

  puts "options_formatter:#{options}"
  code = YKFastlaneExecute.executeFastlaneLane("sync_apple_profile", options)
  exit! code unless  code == 0
end

#sync_gitObject



80
81
82
83
# File 'lib/actions/certificate.rb', line 80

def sync_git()
  puts "#{method(:sync_git)}--options:#{options}"
  self.sync_git_execute({})
end

#update_cerObject



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/actions/certificate.rb', line 65

def update_cer()
  puts "options:#{options}"

  para = {}
  Dir.chdir(Dir.pwd) do
    para[:cer_path] = File.expand_path(options[:cer_path]) unless options[:cer_path].blank?
  end

  para[:password] = options[:cer_password]

  code = YKFastlaneExecute.executeFastlaneLane("update_certificate_p12", para)
  exit! code unless  code == 0
end

#update_profileObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/actions/certificate.rb', line 42

def update_profile()
  result_arr = []
  arr = options[:profile_path]
  if arr != nil && arr.count > 0
    Dir.chdir(Dir.pwd) do
      arr.each do |one|
        path = File.expand_path(one)
        result_arr << path
      end
    end
  end

  str = result_arr.join(",")
  options[:profile_path] = str unless str.blank?
  puts "options:#{options}"
  code = YKFastlaneExecute.executeFastlaneLane("update_profiles", options)
  exit! code unless  code == 0
end