Class: Pindo::Command::Utils::Renewcert
Constant Summary
DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
#args_help_flag
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Appselect
#all_deploy_bundle_name, #all_dev_bundle_name, #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_bundle_name, #get_selected_deploy_bundleid, #get_selected_dev_bundle_name, #get_selected_dev_bundleid, #get_setting_bundleid_withdir, #load_setting, #select_main_app
command_name, #initialize_options, run, use_cache?
#pindo_log_instance
#pindo_single_config
#validate!
Constructor Details
#initialize(argv) ⇒ Renewcert
Returns a new instance of Renewcert.
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/pindo/command/utils/renewcert.rb', line 65
def initialize(argv)
@options = initialize_options(argv)
@fast_flag = @options[:fast] || false
@fixedid_flag = @options[:fixedid] || false
@upload_flag = @options[:upload] || false
@renew_cert_flag = @options[:renew] || false
super
end
|
Class Method Details
.options ⇒ Object
61
62
63
|
# File 'lib/pindo/command/utils/renewcert.rb', line 61
def self.options
option_items.map(&:to_claide_option).concat(super)
end
|
Instance Method Details
#fixed_cert(bundle_id: nil, renew_flag: false, upload_flag: false, fixed_bundleid_flag: false) ⇒ Object
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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
180
181
182
|
# File 'lib/pindo/command/utils/renewcert.rb', line 105
def fixed_cert(bundle_id:nil, renew_flag:false, upload_flag:false, fixed_bundleid_flag: false)
require 'pindo/config/build_info_manager'
Pindo::BuildInfoManager.share_instance.pull_appconfig_with_reponame(
repo_name: bundle_id,
target_dir: Dir.pwd
)
config_file_path = File.join(Dir.pwd, "config.json")
if fixed_bundleid_flag
config_json = JSON.parse(File.read(config_file_path))
require 'pindo/module/appstore/bundleid_helper'
Pindo::BundleIdHelper.execute_bundleid_creation(
config_json: config_json,
sign_flag: false
)
end
Pindo::Command::Appstore::Bundleid::run([])
end
|
#fixed_push(bundle_id: nil, fixed_bundleid: false) ⇒ Object
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
# File 'lib/pindo/command/utils/renewcert.rb', line 185
def fixed_push(bundle_id:nil, fixed_bundleid: false)
require 'pindo/config/build_info_manager'
Pindo::BuildInfoManager.share_instance.pull_appconfig_with_reponame(
repo_name: bundle_id,
target_dir: Dir.pwd
)
config_file_path = File.join(Dir.pwd, "config.json")
config_json = JSON.parse(File.read(config_file_path))
require 'pindo/module/cert/pem_helper'
Pindo::PemHelper.execute_pem_creation(
config_json: config_json,
dev_flag: true,
deploy_repo_name: nil
)
Pindo::PemHelper.execute_pem_creation(
config_json: config_json,
dev_flag: false,
deploy_repo_name: nil
)
end
|
#run ⇒ Object
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# File 'lib/pindo/command/utils/renewcert.rb', line 77
def run
@dev_bundle_id_array = all_dev_bundleid()
@tool_bundle_id_array = all_tool_bundleid()
@deploy_bundle_id_array = all_release_bundleid()
fixed_bundleid_array = @dev_bundle_id_array + @deploy_bundle_id_array + @tool_bundle_id_array
puts fixed_bundleid_array
fixed_bundleid_array.each do |bundle_id|
if bundle_id.include?("*")
bundle_id = bundle_id.gsub(".*", "")
end
fixed_cert(bundle_id:bundle_id, renew_flag:@renew_cert_flag, upload_flag:@upload_flag, fixed_bundleid_flag:@fixedid_flag)
end
end
|