pindo 4.9.2 → 4.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pindo/base/githelper.rb +6 -6
- data/lib/pindo/client/pgyerclient.rb +1 -1
- data/lib/pindo/command/dev/autobuild.rb +55 -107
- data/lib/pindo/command/dev/build.rb +40 -43
- data/lib/pindo/command/dev/debug.rb +6 -4
- data/lib/pindo/command/dev/repoinit.rb +128 -0
- data/lib/pindo/command/dev/tag.rb +26 -13
- data/lib/pindo/command/dev.rb +1 -2
- data/lib/pindo/command/ios/autobuild.rb +210 -0
- data/lib/pindo/command/ios/build.rb +14 -0
- data/lib/pindo/command/ios/debug.rb +133 -164
- data/lib/pindo/command/ios.rb +2 -2
- data/lib/pindo/command/ipa/import.rb +1 -1
- data/lib/pindo/command/pgyer/apptest.rb +18 -7
- data/lib/pindo/command/pgyer/comment.rb +15 -3
- data/lib/pindo/command/pgyer/download.rb +15 -3
- data/lib/pindo/command/pgyer/login.rb +14 -4
- data/lib/pindo/command/pgyer/resign.rb +20 -4
- data/lib/pindo/command/pgyer/upload.rb +52 -8
- data/lib/pindo/command/unity/ipa.rb +34 -68
- data/lib/pindo/command.rb +0 -1
- data/lib/pindo/module/build/buildhelper.rb +48 -4
- data/lib/pindo/module/build/unityhelper.rb +33 -106
- data/lib/pindo/version.rb +1 -1
- metadata +4 -10
- data/lib/pindo/command/dev/applovin.rb +0 -223
- data/lib/pindo/command/dev/autoresign.rb +0 -143
- data/lib/pindo/command/dev/confusecode.rb +0 -127
- data/lib/pindo/command/dev/confuseproj.rb +0 -111
- data/lib/pindo/command/dev/createbuild.rb +0 -156
- data/lib/pindo/command/dev/pgyercert.rb +0 -75
- data/lib/pindo/command/ios/cert.rb +0 -164
- data/lib/pindo/command/upgrade.rb +0 -56
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pindo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.9.
|
|
4
|
+
version: 4.9.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wade
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-02-
|
|
10
|
+
date: 2025-02-22 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: claide
|
|
@@ -274,15 +274,10 @@ files:
|
|
|
274
274
|
- lib/pindo/command/deploy/updateconfig.rb
|
|
275
275
|
- lib/pindo/command/deploy/uploadipa.rb
|
|
276
276
|
- lib/pindo/command/dev.rb
|
|
277
|
-
- lib/pindo/command/dev/applovin.rb
|
|
278
277
|
- lib/pindo/command/dev/autobuild.rb
|
|
279
|
-
- lib/pindo/command/dev/autoresign.rb
|
|
280
278
|
- lib/pindo/command/dev/build.rb
|
|
281
|
-
- lib/pindo/command/dev/confusecode.rb
|
|
282
|
-
- lib/pindo/command/dev/confuseproj.rb
|
|
283
|
-
- lib/pindo/command/dev/createbuild.rb
|
|
284
279
|
- lib/pindo/command/dev/debug.rb
|
|
285
|
-
- lib/pindo/command/dev/
|
|
280
|
+
- lib/pindo/command/dev/repoinit.rb
|
|
286
281
|
- lib/pindo/command/dev/tag.rb
|
|
287
282
|
- lib/pindo/command/env.rb
|
|
288
283
|
- lib/pindo/command/env/dreamstudio.rb
|
|
@@ -298,9 +293,9 @@ files:
|
|
|
298
293
|
- lib/pindo/command/ios.rb
|
|
299
294
|
- lib/pindo/command/ios/adhoc.rb
|
|
300
295
|
- lib/pindo/command/ios/applovin.rb
|
|
296
|
+
- lib/pindo/command/ios/autobuild.rb
|
|
301
297
|
- lib/pindo/command/ios/autoresign.rb
|
|
302
298
|
- lib/pindo/command/ios/build.rb
|
|
303
|
-
- lib/pindo/command/ios/cert.rb
|
|
304
299
|
- lib/pindo/command/ios/debug.rb
|
|
305
300
|
- lib/pindo/command/ipa.rb
|
|
306
301
|
- lib/pindo/command/ipa/autoresign.rb
|
|
@@ -327,7 +322,6 @@ files:
|
|
|
327
322
|
- lib/pindo/command/unity.rb
|
|
328
323
|
- lib/pindo/command/unity/apk.rb
|
|
329
324
|
- lib/pindo/command/unity/ipa.rb
|
|
330
|
-
- lib/pindo/command/upgrade.rb
|
|
331
325
|
- lib/pindo/command/utils.rb
|
|
332
326
|
- lib/pindo/command/utils/boss.rb
|
|
333
327
|
- lib/pindo/command/utils/clearcert.rb
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require 'highline/import'
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
require 'json'
|
|
6
|
-
require 'faraday'
|
|
7
|
-
require 'xcodeproj'
|
|
8
|
-
|
|
9
|
-
module Pindo
|
|
10
|
-
class Command
|
|
11
|
-
class Dev < Command
|
|
12
|
-
class Applovin < Dev
|
|
13
|
-
|
|
14
|
-
self.summary = '接入applovin max广告平台时更新Xcode中info.plist'
|
|
15
|
-
|
|
16
|
-
self.description = <<-DESC
|
|
17
|
-
接入applovin max广告平台时更新Xcode中info.plist,用法:在工程目录下执行 pindo utils applovin
|
|
18
|
-
DESC
|
|
19
|
-
|
|
20
|
-
self.arguments = [
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
def self.options
|
|
24
|
-
[
|
|
25
|
-
['--appstore', 'appstore模式,一般不用'],
|
|
26
|
-
['--install', '是否运行applovin脚本'],
|
|
27
|
-
['--upload', '保存ids, 留作applovin网络不好情况使用'],
|
|
28
|
-
].concat(super)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def initialize(argv)
|
|
32
|
-
|
|
33
|
-
@args_appstore_flag = argv.flag?('appstore', false)
|
|
34
|
-
@args_install_flag = argv.flag?('install', false)
|
|
35
|
-
@args_upload_flag = argv.flag?('upload', false)
|
|
36
|
-
|
|
37
|
-
super(argv)
|
|
38
|
-
@additional_args = argv.remainder!
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def validate!
|
|
42
|
-
super
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def run
|
|
46
|
-
|
|
47
|
-
skadnetwork_id_array = []
|
|
48
|
-
|
|
49
|
-
Funlog.instance.fancyinfo_start("正在请求applovin数据...")
|
|
50
|
-
|
|
51
|
-
applovin_res_json = req_applovin_json
|
|
52
|
-
# puts JSON.pretty_generate(applovin_res_json)
|
|
53
|
-
|
|
54
|
-
if !applovin_res_json.nil? && !applovin_res_json["skadnetwork_ids"].nil?
|
|
55
|
-
applovin_res_json["skadnetwork_ids"].each do |network_id|
|
|
56
|
-
skadnetwork_id_array << network_id["skadnetwork_id"]
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
applovin_media_res_json = req_applovin_mediia_json
|
|
61
|
-
# puts JSON.pretty_generate(applovin_media_res_json)
|
|
62
|
-
if !applovin_media_res_json.nil? && !applovin_media_res_json["mediationSKAdnetworkIdsSpecs"].nil?
|
|
63
|
-
applovin_media_res_json["mediationSKAdnetworkIdsSpecs"].each do |media_item|
|
|
64
|
-
skadnetwork_id_array = skadnetwork_id_array + media_item["skAdnetworkIds"]
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
skadnetwork_id_array = skadnetwork_id_array.uniq || []
|
|
69
|
-
|
|
70
|
-
Funlog.instance.fancyinfo_success("请求applovin数据,获取到#{skadnetwork_id_array.size}条数据...")
|
|
71
|
-
|
|
72
|
-
if !skadnetwork_id_array.nil? && skadnetwork_id_array.size > 50
|
|
73
|
-
# puts "From Applovin SKAdNetworkItems Size: #{skadnetwork_id_array.size}"
|
|
74
|
-
if @args_upload_flag
|
|
75
|
-
applovin_config_file = File.join(pindo_single_config.pindo_common_configdir,"applovin_client_config.json")
|
|
76
|
-
origin_json = {}
|
|
77
|
-
if File.exist?(applovin_config_file)
|
|
78
|
-
origin_json = JSON.parse(File.read(applovin_config_file))
|
|
79
|
-
end
|
|
80
|
-
origin_json["SKAdNetworkItems"] = skadnetwork_id_array
|
|
81
|
-
File.write(applovin_config_file, JSON.pretty_generate(origin_json))
|
|
82
|
-
git_addpush_repo(path:pindo_single_config.pindo_common_configdir, message:"Applovin SKAdNetworkItems", commit_file_params:["applovin_client_config.json"])
|
|
83
|
-
end
|
|
84
|
-
else
|
|
85
|
-
Funlog.instance.fancyinfo_start("网络拉取applovin数据太少,从缓存中获取数据...")
|
|
86
|
-
config_file = File.join(File::expand_path(Pindoconfig.instance.pindo_common_configdir), "applovin_client_config.json")
|
|
87
|
-
config_json = JSON.parse(File.read(config_file))
|
|
88
|
-
skadnetwork_id_array = skadnetwork_id_array + config_json["SKAdNetworkItems"]
|
|
89
|
-
# puts "From Config SKAdNetworkItems Size: #{skadnetwork_id_array.size}"
|
|
90
|
-
Funlog.instance.fancyinfo_success("网络拉取applovin数据太少,从缓存中获取到#{skadnetwork_id_array.size}条数据...")
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Funlog.instance.fancyinfo_start("正在写入Xcode中...")
|
|
95
|
-
|
|
96
|
-
skadnetwork_id_array = skadnetwork_id_array.uniq || []
|
|
97
|
-
|
|
98
|
-
project_root_dir = Dir.pwd
|
|
99
|
-
xcodeproj_file_name = Dir.glob(File.join(project_root_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
|
100
|
-
|
|
101
|
-
plist_file_name = File.join(project_root_dir, "AppEntry/Info.plist")
|
|
102
|
-
if !xcodeproj_file_name.nil?
|
|
103
|
-
proj_name = File.basename(xcodeproj_file_name, ".xcodeproj")
|
|
104
|
-
plist_file_name = get_applovin_infoplist(project_dir:project_root_dir, proj_name:proj_name)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
info_plist_dict = {}
|
|
109
|
-
if File.exist?(plist_file_name)
|
|
110
|
-
info_plist_dict = Xcodeproj::Plist.read_from_path(plist_file_name)
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
info_plist_dict["NSAdvertisingAttributionReportEndpoint"] = info_plist_dict["NSAdvertisingAttributionReportEndpoint"] || "https://postbacks-app.com"
|
|
115
|
-
|
|
116
|
-
if !info_plist_dict.has_key?("NSAppTransportSecurity")
|
|
117
|
-
info_plist_dict["NSAppTransportSecurity"] = {}
|
|
118
|
-
info_plist_dict["NSAppTransportSecurity"]["NSAllowsArbitraryLoads"] = true
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if !skadnetwork_id_array.nil? && skadnetwork_id_array.size > 0
|
|
123
|
-
info_plist_dict["SKAdNetworkItems"] = []
|
|
124
|
-
skadnetwork_id_array.each do |network_id|
|
|
125
|
-
item = {}
|
|
126
|
-
item["SKAdNetworkIdentifier"] = network_id
|
|
127
|
-
info_plist_dict["SKAdNetworkItems"] << item
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
Xcodeproj::Plist.write_to_path(info_plist_dict, plist_file_name)
|
|
132
|
-
|
|
133
|
-
Funlog.instance.fancyinfo_success("Xcode中applovin数据修改完成!")
|
|
134
|
-
|
|
135
|
-
if @args_install_flag && !xcodeproj_file_name.nil? && File.exist?(xcodeproj_file_name)
|
|
136
|
-
|
|
137
|
-
pindo_common_dir = pindo_single_config.pindo_common_configdir
|
|
138
|
-
|
|
139
|
-
app_lovin_script = File.join(pindo_common_dir, "AppLovinQualityServiceSetup-ios-dev.rb")
|
|
140
|
-
if @args_appstore_flag
|
|
141
|
-
app_lovin_script = File.join(pindo_common_dir, "AppLovinQualityServiceSetup-ios.rb")
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
project_script_file = File.join(project_root_dir, "AppLovinQualityServiceSetup-ios.rb")
|
|
145
|
-
FileUtils.cp_r(app_lovin_script, project_script_file)
|
|
146
|
-
command = "ruby " + project_script_file
|
|
147
|
-
# puts command
|
|
148
|
-
system command
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
def get_applovin_infoplist(project_dir:nil, proj_name:nil)
|
|
156
|
-
|
|
157
|
-
info_plist_path = File.join(project_dir, "AppEntry/Info.plist")
|
|
158
|
-
proj_fullname = File.join(project_dir, proj_name) + ".xcodeproj"
|
|
159
|
-
if File.exist?(proj_fullname)
|
|
160
|
-
project_obj = Xcodeproj::Project.open(proj_fullname)
|
|
161
|
-
project_obj.targets.each do |target|
|
|
162
|
-
|
|
163
|
-
if target.product_type.to_s.eql?("com.apple.product-type.application") then
|
|
164
|
-
temp_info = target.build_configurations.first.build_settings['INFOPLIST_FILE']
|
|
165
|
-
info_plist_path = File.join(project_dir, temp_info)
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
return info_plist_path
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
def req_applovin_json
|
|
175
|
-
|
|
176
|
-
begin
|
|
177
|
-
# https://dash.applovin.com/docs/v1/skadnetwork_ids.json
|
|
178
|
-
applovin_url = "https://dash.applovin.com/docs/v1/skadnetwork_ids.json"
|
|
179
|
-
con = Faraday.new
|
|
180
|
-
res = con.get do |req|
|
|
181
|
-
req.url applovin_url
|
|
182
|
-
req.headers['Content-Type'] = 'application/json'
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
applovin_res_json = JSON.parse(res.body)
|
|
186
|
-
|
|
187
|
-
return applovin_res_json
|
|
188
|
-
rescue Exception => e
|
|
189
|
-
return nil
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
def req_applovin_mediia_json
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
begin
|
|
200
|
-
applovin_url = "https://dash.applovin.com/docs/v1/mediation_sk_adnetwork_ids"
|
|
201
|
-
con = Faraday.new
|
|
202
|
-
res = con.get do |req|
|
|
203
|
-
req.url applovin_url
|
|
204
|
-
req.headers['Content-Type'] = 'application/json'
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
applovin_res_json = JSON.parse(res.body)
|
|
208
|
-
return applovin_res_json
|
|
209
|
-
rescue Exception => e
|
|
210
|
-
return nil
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
require 'highline/import'
|
|
2
|
-
require 'xcodeproj'
|
|
3
|
-
require 'find'
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
require 'pindo/base/executable'
|
|
6
|
-
|
|
7
|
-
module Pindo
|
|
8
|
-
class Command
|
|
9
|
-
class Dev < Command
|
|
10
|
-
class Autoresign < Dev
|
|
11
|
-
|
|
12
|
-
include Appselect
|
|
13
|
-
|
|
14
|
-
self.summary = '开发阶段ipa包重签名'
|
|
15
|
-
|
|
16
|
-
self.description = <<-DESC
|
|
17
|
-
用最新的证书重签名ipa. 用法:pindo dev autoresign, 默认使用dev证书给当前目录下面的ipa重签名。
|
|
18
|
-
也可以加上可选参数,例如:pindo dev autoresign ~/Desktop/mydemo.ipa --adhoc --deploy --upload.
|
|
19
|
-
DESC
|
|
20
|
-
|
|
21
|
-
self.arguments = [
|
|
22
|
-
CLAide::Argument.new('path/to/demo.ipa', true),
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
def self.options
|
|
26
|
-
[
|
|
27
|
-
['--ipa', '指定ipa的路径,用法:pindo dev autoresign --ipa=path/to/name.ipa'],
|
|
28
|
-
['--adhoc', '默认用dev证书,使用--adhoc设置使用adhoc证书编译, 用法:pindo dev autoresign --adhoc'],
|
|
29
|
-
['--deploy', '默认用开发的bundle id,使用--deploy设置使用发布bundle id来重签名, 用法:pindo dev autoresign --deploy'],
|
|
30
|
-
['--proj', '指定上传到pgyer对应的项目名称(大小写空格忽略),用法:pindo dev autoresign --proj=aichatv4'],
|
|
31
|
-
['--upload', '是否上传编译后的ipa, 用法:pindo dev autoresign --upload'],
|
|
32
|
-
['--send', '上传到之后是否发送测试信息,用法:pindo dev autoresign --send'],
|
|
33
|
-
].concat(super)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def initialize(argv)
|
|
38
|
-
|
|
39
|
-
@args_ipa_file = argv.shift_argument
|
|
40
|
-
@args_set_ipa_name = argv.option('ipa')
|
|
41
|
-
@args_adhoc_flag = argv.flag?('adhoc', false)
|
|
42
|
-
@args_deploy_flag = argv.flag?('deploy', false)
|
|
43
|
-
|
|
44
|
-
@args_upload_flag = argv.flag?('upload', false)
|
|
45
|
-
@args_send_flag = argv.flag?('send', false)
|
|
46
|
-
@args_proj_name = argv.option('proj')
|
|
47
|
-
|
|
48
|
-
if @args_send_flag
|
|
49
|
-
@args_upload_flag = true
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
super
|
|
53
|
-
@additional_args = argv.remainder!
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def run
|
|
58
|
-
|
|
59
|
-
ipa_file_name = @args_ipa_file
|
|
60
|
-
if !@args_set_ipa_name.nil?
|
|
61
|
-
ipa_file_name = @args_set_ipa_name
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
if !ipa_file_name.nil? && File.exist?(ipa_file_name)
|
|
65
|
-
else
|
|
66
|
-
current_dir = Dir.pwd
|
|
67
|
-
# File.basename(f).include?("_resigned") ? Time.local(0, 0, 0) : File.mtime(f)
|
|
68
|
-
ipa_file_name = Dir.glob(File.join(current_dir, "/*.ipa")).max_by {|f| File.basename(f).include?("_resigned") ? Time.local(0, 1, 1) : File.mtime(f)}
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
if !ipa_file_name.nil? && File.exist?(ipa_file_name)
|
|
72
|
-
puts
|
|
73
|
-
puts "正在重签名的ipa: #{ipa_file_name}"
|
|
74
|
-
puts "时间: #{File.mtime(ipa_file_name)}"
|
|
75
|
-
puts
|
|
76
|
-
else
|
|
77
|
-
return
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
mainapp_bundleid = nil
|
|
82
|
-
|
|
83
|
-
if @args_deploy_flag
|
|
84
|
-
mainapp_bundleid = get_selected_deploy_bundleid()
|
|
85
|
-
else
|
|
86
|
-
mainapp_bundleid = get_selected_dev_bundleid()
|
|
87
|
-
end
|
|
88
|
-
puts "mainapp_bundleid: #{mainapp_bundleid}"
|
|
89
|
-
|
|
90
|
-
args_temp = []
|
|
91
|
-
args_temp << mainapp_bundleid
|
|
92
|
-
|
|
93
|
-
Pindo::Command::Deploy::Pullconfig::run(args_temp)
|
|
94
|
-
|
|
95
|
-
app_info_obj = nil
|
|
96
|
-
if @args_upload_flag
|
|
97
|
-
proj_name = @args_proj_name
|
|
98
|
-
app_info_obj = PgyerHelper.share_instace.prepare_upload(working_directory:Dir.pwd, proj_name:proj_name)
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
args_temp = []
|
|
102
|
-
if @args_adhoc_flag
|
|
103
|
-
args_temp << "--adhoc"
|
|
104
|
-
else
|
|
105
|
-
args_temp << "--dev"
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if !ipa_file_name.nil?
|
|
109
|
-
|
|
110
|
-
args_temp << "--ipa=#{ipa_file_name}"
|
|
111
|
-
Pindo::Command::Deploy::Resign::run(args_temp)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
ipa_file_name = File::expand_path(ipa_file_name)
|
|
115
|
-
ipa_base_name = File.basename(ipa_file_name, ".ipa")
|
|
116
|
-
ipa_dir = File.dirname(ipa_file_name)
|
|
117
|
-
ipa_file_upload = File.join(ipa_dir, ipa_base_name + "_resigned.ipa")
|
|
118
|
-
|
|
119
|
-
if !ipa_file_upload.nil? && !app_info_obj.nil?
|
|
120
|
-
description = "测试包重签名"
|
|
121
|
-
result_data = PgyerHelper.share_instace.start_upload(app_info_obj:app_info_obj, ipa_file_upload:ipa_file_upload, description:nil)
|
|
122
|
-
if !result_data.nil? && !result_data["data"].nil? && !result_data["data"]["id"].nil?
|
|
123
|
-
msg_data = PgyerHelper.share_instace.make_msg_data(app_info_obj:app_info_obj, app_version_info_obj:result_data["data"])
|
|
124
|
-
PgyerHelper.share_instace.print_app_version_info(msg_data:msg_data)
|
|
125
|
-
if @args_send_flag
|
|
126
|
-
PgyerHelper.share_instace.send_apptest_wechat_msg(msg_data:msg_data)
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
#
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
require 'highline/import'
|
|
2
|
-
require 'xcodeproj'
|
|
3
|
-
require 'find'
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
|
|
6
|
-
module Pindo
|
|
7
|
-
class Command
|
|
8
|
-
class Dev < Command
|
|
9
|
-
class Confusecode < Dev
|
|
10
|
-
|
|
11
|
-
include Command::DeployOptions
|
|
12
|
-
|
|
13
|
-
include CommonConfuseProj
|
|
14
|
-
|
|
15
|
-
self.summary = '设置混淆编译第一步'
|
|
16
|
-
|
|
17
|
-
self.description = <<-DESC
|
|
18
|
-
目前该混淆方法已经废弃。设置混淆编译第一步.用法: pindo dev confusecode --type=class_method_variable_protocol_property_category_pods
|
|
19
|
-
|
|
20
|
-
DESC
|
|
21
|
-
|
|
22
|
-
self.arguments = [
|
|
23
|
-
CLAide::Argument.new('path/to/config.json', true),
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
def self.options
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
].concat(super)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def initialize(argv)
|
|
33
|
-
super
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def validate!
|
|
37
|
-
super
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def run
|
|
41
|
-
|
|
42
|
-
current_dir = Dir.pwd
|
|
43
|
-
current_project_dir = current_dir
|
|
44
|
-
app_config_dir = clong_buildconfig_repo(repo_name: @deploy_repo_name)
|
|
45
|
-
|
|
46
|
-
clang_repo_dir = clone_devclang_repo
|
|
47
|
-
# if !File.exist?(clang_repo_dir)
|
|
48
|
-
puts "#{clang_repo_dir}"
|
|
49
|
-
puts "There is no clang tool !!! dev confusecode"
|
|
50
|
-
# return
|
|
51
|
-
# end
|
|
52
|
-
|
|
53
|
-
symash_type = confuse_version_type(path:current_project_dir, default_type:"symash2")
|
|
54
|
-
if @newconfuse_flag
|
|
55
|
-
symash_type = "symash2"
|
|
56
|
-
end
|
|
57
|
-
confuse_tool_path = File.join(clang_repo_dir, symash_type)
|
|
58
|
-
puts "Confuse Tool Path: #{confuse_tool_path}"
|
|
59
|
-
|
|
60
|
-
meaning_tool = File.join(clang_repo_dir, "MeaningfulTools/MeaningfulName")
|
|
61
|
-
|
|
62
|
-
if symash_type == "symash1"
|
|
63
|
-
|
|
64
|
-
base_db = File.join(clang_repo_dir, "MeaningfulTools/confuse.db")
|
|
65
|
-
meaning_db = File.join(current_project_dir, "SymashCache/app_confuse.db")
|
|
66
|
-
origin_json_dir = File.join(current_project_dir, "SymashCache/Original")
|
|
67
|
-
output_dir = File.join(current_project_dir, "SymashCache")
|
|
68
|
-
confuse_type= @confuse_type
|
|
69
|
-
|
|
70
|
-
if File.exist?(File.join(output_dir, "Replaced.json"))
|
|
71
|
-
FileUtils.rm_rf(File.join(output_dir, "Replaced.json"))
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
puts "Tool: #{meaning_tool}"
|
|
75
|
-
puts "Base DB: #{base_db}"
|
|
76
|
-
puts "DB: #{meaning_db}"
|
|
77
|
-
puts "Origin Dir: #{origin_json_dir}"
|
|
78
|
-
puts "Output Dir: #{output_dir}"
|
|
79
|
-
puts "Project Dir: #{current_project_dir}"
|
|
80
|
-
puts "Confuse Type: #{confuse_type}"
|
|
81
|
-
|
|
82
|
-
if File.exist?(origin_json_dir)
|
|
83
|
-
command = meaning_tool + " -r -p 100 -i 100 -b " + @bundle_id + " -d " + origin_json_dir + " -o " + base_db + " -m " + meaning_db + " -t " + output_dir + " -f " + current_project_dir + " -z " + confuse_type
|
|
84
|
-
puts "Command: #{command}"
|
|
85
|
-
system command
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
text = File.read(File.join(current_project_dir, "Symash.json"))
|
|
89
|
-
new_contents = text.gsub(/\"IMPORT\".*/, "\"IMPORT\":true,")
|
|
90
|
-
File.open(File.join(current_project_dir, "Symash.json"), "w") {|file| file.puts new_contents }
|
|
91
|
-
|
|
92
|
-
text = File.read(File.join(current_project_dir, "Symash.json"))
|
|
93
|
-
new_contents = text.gsub(/\"STRICT\".*/, "\"STRICT\":true,")
|
|
94
|
-
File.open(File.join(current_project_dir, "Symash.json"), "w") {|file| file.puts new_contents }
|
|
95
|
-
else
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
puts "Tool: #{meaning_tool}"
|
|
99
|
-
|
|
100
|
-
puts "+++++++"
|
|
101
|
-
puts "+++++++"
|
|
102
|
-
puts "+++++++"
|
|
103
|
-
service_path = File.join(confuse_tool_path, "/Applications/SymashX.app/Contents/MacOS/symashctl")
|
|
104
|
-
command1 = "cd #{current_project_dir} && " + service_path + " stop"
|
|
105
|
-
puts "Command: #{command1}"
|
|
106
|
-
system command1
|
|
107
|
-
puts "+++++++"
|
|
108
|
-
puts "+++++++"
|
|
109
|
-
puts "+++++++"
|
|
110
|
-
|
|
111
|
-
if File.exist?(File.join(current_project_dir, "SymashData/export-sympkg.plist"))
|
|
112
|
-
command = meaning_tool + " -q -f " + current_project_dir
|
|
113
|
-
puts "Command: #{command}"
|
|
114
|
-
system command
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
command2 = "cd #{current_project_dir} && " + service_path + " start -backend"
|
|
118
|
-
puts "Command: #{command2}"
|
|
119
|
-
system command2
|
|
120
|
-
puts "Done !"
|
|
121
|
-
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
require 'highline/import'
|
|
2
|
-
require 'xcodeproj'
|
|
3
|
-
require 'find'
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
module Pindo
|
|
8
|
-
class Command
|
|
9
|
-
class Dev < Command
|
|
10
|
-
class Confuseproj < Dev
|
|
11
|
-
|
|
12
|
-
require 'pindo/deploy/confuseproj'
|
|
13
|
-
|
|
14
|
-
include Command::DeployOptions
|
|
15
|
-
|
|
16
|
-
include CommonConfuseProj
|
|
17
|
-
|
|
18
|
-
self.summary = '设置混淆编译第一步'
|
|
19
|
-
|
|
20
|
-
self.description = <<-DESC
|
|
21
|
-
设置混淆编译第一步. 用法:\n
|
|
22
|
-
pindo dev confuseproj --type=class_method_variable_protocol_property_category
|
|
23
|
-
|
|
24
|
-
for example: --type=class_method
|
|
25
|
-
|
|
26
|
-
class: confuse class
|
|
27
|
-
method: confuse method
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
DESC
|
|
31
|
-
|
|
32
|
-
self.arguments = [
|
|
33
|
-
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
def self.options
|
|
37
|
-
[
|
|
38
|
-
].concat(super)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def initialize(argv)
|
|
42
|
-
super
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def validate!
|
|
46
|
-
super
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def run
|
|
50
|
-
|
|
51
|
-
current_dir = Dir.pwd
|
|
52
|
-
current_project_dir = current_dir
|
|
53
|
-
puts "+++++ #{current_project_dir}"
|
|
54
|
-
|
|
55
|
-
app_config_dir = clong_buildconfig_repo(repo_name: @deploy_repo_name)
|
|
56
|
-
clang_repo_dir = clone_devclang_repo
|
|
57
|
-
# if !File.exist?(clang_repo_dir)
|
|
58
|
-
puts "#{clang_repo_dir}"
|
|
59
|
-
puts "There is no clang tool !!! dev confuseproj"
|
|
60
|
-
# return
|
|
61
|
-
# end
|
|
62
|
-
|
|
63
|
-
symash_type = confuse_version_type(path:app_config_dir, default_type:"symash2")
|
|
64
|
-
if @newconfuse_flag
|
|
65
|
-
symash_type = "symash2"
|
|
66
|
-
end
|
|
67
|
-
confuse_tool_path = File.join(clang_repo_dir, symash_type)
|
|
68
|
-
puts "Confuse Tool Path: #{confuse_tool_path}"
|
|
69
|
-
|
|
70
|
-
puts "Clang Path: #{confuse_tool_path}"
|
|
71
|
-
install_symash(clang_path:confuse_tool_path)
|
|
72
|
-
|
|
73
|
-
current_project_fullname = ""
|
|
74
|
-
Dir.foreach(current_dir) do |file|
|
|
75
|
-
if file =~ /(.*).xcodeproj/
|
|
76
|
-
current_project_fullname = file
|
|
77
|
-
break;
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
old_proj_name = File.basename(current_project_fullname, ".xcodeproj")
|
|
82
|
-
|
|
83
|
-
config_confuse_project(clang_path:confuse_tool_path, project_name:old_proj_name, project_path:current_project_dir, default_type:symash_type)
|
|
84
|
-
config_symash(clang_path:confuse_tool_path, project_path:current_project_dir, confuse_type:@confuse_type, default_type:symash_type)
|
|
85
|
-
|
|
86
|
-
force_config = nil
|
|
87
|
-
force_config = {}
|
|
88
|
-
# force_config['BACKEND_SYMASH_DISABLE_SPL'] = true
|
|
89
|
-
force_config['BACKEND_SYMASH_DISABLE_BCF_PROB'] = 50
|
|
90
|
-
|
|
91
|
-
update_symash_config(app_config_dir:app_config_dir, project_path:current_project_dir, confuse_type:@confuse_type, force_config: force_config)
|
|
92
|
-
|
|
93
|
-
if symash_type == "symash2"
|
|
94
|
-
Dir.chdir(current_project_dir)
|
|
95
|
-
puts "+++++ #{current_project_dir}"
|
|
96
|
-
service_path = File.join(confuse_tool_path, "/Applications/SymashX.app/Contents/MacOS/symashctl")
|
|
97
|
-
command1 = "cd #{current_project_dir} && " + service_path + " stop"
|
|
98
|
-
command2 = "cd #{current_project_dir} && " + service_path + " start -export"
|
|
99
|
-
puts "Command: #{command1}"
|
|
100
|
-
system command1
|
|
101
|
-
puts "Command: #{command2}"
|
|
102
|
-
system command2
|
|
103
|
-
Dir.chdir(current_project_dir)
|
|
104
|
-
puts "Done !"
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|