fastlane-plugin-zhuixi_build_app 1.0.2 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75d72ab6ff7891ce8c66de90fd0ec51ba2ad3b4d5972386cf17273e1e027d1e1
|
4
|
+
data.tar.gz: c9335d5f0abf8b0774cf2babae44c69f19912a97b8b303c071ee86d6d42bcf01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7452f8f39189e844ec28f367ce0caae3bad2cca4e605073f942651f61e6b24819705aa2dab631ae6e254ad3fb54a76844f78c64bfd4fa212f7eb08a43dc4b29
|
7
|
+
data.tar.gz: 02ba6a04716fe7b0eb0c9c0cc97db85e11d5d3effc1a8dd081e8a9daaa2e035cf128bab765ccce1ba7564274360c2a7b00a4387f5856c81f4f3ad7f8b7313f36
|
@@ -15,6 +15,8 @@ module Fastlane
|
|
15
15
|
lane_context[:selectGameName] = app_file_config[:selectGameName]
|
16
16
|
lane_context[:selectPlatformName] = app_file_config[:platform]
|
17
17
|
lane_context[:ori_xcodeproj_path] = app_file_config[:ori_xcodeproj_path]
|
18
|
+
lane_context[:export_method] = app_file_config[:export_method]
|
19
|
+
lane_context[:provisioning_profile_name] = app_file_config[:provisioning_profile_name]
|
18
20
|
UI.message("ZHUIXI---读取配置成功!app_file_path:\n#{app_file_path}")
|
19
21
|
# 返回 account 和 password
|
20
22
|
return { account: account, password: password }
|
@@ -108,15 +108,20 @@ module Fastlane
|
|
108
108
|
|
109
109
|
# 如果 info_plist_data 没有 LSApplicationQueriesSchemes 配置,先创建一个空数组
|
110
110
|
info_plist_data["LSApplicationQueriesSchemes"] ||= []
|
111
|
-
|
111
|
+
# 修改 Bundle Identifier 和 Display Name
|
112
|
+
info_plist_data["CFBundleIdentifier"] = lane_context[:configParams]["gamePackageName"]
|
113
|
+
info_plist_data["CFBundleDisplayName"] = lane_context[:configParams]["gamename"]
|
112
114
|
# 3. 读取 TempInfo.plist 文件
|
113
115
|
temp_info_plist_data = Plist.parse_xml(File.join(lane_context[:zhuixi_path], "TempInfo.plist"))
|
114
116
|
|
115
|
-
# 添加 TempInfo.plist 中不存在的 LSApplicationQueriesSchemes 配置到 info.plist 文件
|
116
|
-
temp_info_plist_data["LSApplicationQueriesSchemes"].each do |scheme|
|
117
|
-
|
118
|
-
end
|
117
|
+
# # 添加 TempInfo.plist 中不存在的 LSApplicationQueriesSchemes 配置到 info.plist 文件
|
118
|
+
# temp_info_plist_data["LSApplicationQueriesSchemes"].each do |scheme|
|
119
|
+
# info_plist_data["LSApplicationQueriesSchemes"] << scheme unless info_plist_data["LSApplicationQueriesSchemes"].include?(scheme)
|
120
|
+
# end
|
119
121
|
|
122
|
+
temp_info_plist_data.each do |key, value|
|
123
|
+
info_plist_data[key] = value
|
124
|
+
end
|
120
125
|
# 5. 写入 info.plist 文件
|
121
126
|
File.write(info_plist_absolute_path, info_plist_data.to_plist)
|
122
127
|
|
@@ -160,21 +165,39 @@ module Fastlane
|
|
160
165
|
add_channel_sdk_library()
|
161
166
|
end
|
162
167
|
# 是否在动态库集合
|
163
|
-
def self.isEmbedFramework(filename
|
164
|
-
|
168
|
+
def self.isEmbedFramework(filename)
|
169
|
+
framework_path = filename.to_s
|
170
|
+
framework_name = File.basename(framework_path, ".*") # 提取 .framework 文件的名称
|
171
|
+
if lane_context[:platform_id] == 59 && framework_name == "boRanSDK"
|
172
|
+
# 在 .framework 目录中搜索与文件名相同的文件
|
173
|
+
file_path = Dir.glob("#{framework_path}/#{framework_name}").first
|
174
|
+
|
175
|
+
if file_path.nil?
|
176
|
+
UI.error("File not found for #{framework_name}.")
|
177
|
+
return false
|
178
|
+
end
|
165
179
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
180
|
+
# 使用 file 命令查看文件类型
|
181
|
+
file_output = sh("file #{file_path}")
|
182
|
+
|
183
|
+
# 检查文件类型中是否包含 "dynamic" 或 "shared",表示动态库
|
184
|
+
is_dynamic_library = file_output.include?("dynamic") || file_output.include?("shared")
|
185
|
+
|
186
|
+
if is_dynamic_library
|
187
|
+
# 文件是动态库
|
188
|
+
# 执行相应的操作
|
189
|
+
# ...
|
190
|
+
puts "文件是动态库 #{framework_name}"
|
191
|
+
return true
|
192
|
+
else
|
193
|
+
# 文件是静态库
|
194
|
+
# 执行其他操作
|
195
|
+
# ...
|
196
|
+
puts "文件是静态库 #{framework_name}"
|
197
|
+
return false
|
198
|
+
end
|
177
199
|
end
|
200
|
+
return false
|
178
201
|
end
|
179
202
|
|
180
203
|
def self.add_channel_sdk_library()
|
@@ -235,7 +258,7 @@ module Fastlane
|
|
235
258
|
end
|
236
259
|
#项目中可能有多个copy files build phases,找到刚刚创建的那个,然后把xx.framework引入
|
237
260
|
|
238
|
-
if !"".eql? lib_real_path and isEmbedFramework(filename
|
261
|
+
if !"".eql? lib_real_path and isEmbedFramework(filename)
|
239
262
|
lane_context[:target].copy_files_build_phases.each do |item|
|
240
263
|
if item.name == "Embed Frameworks"
|
241
264
|
#引入xx.framework
|
@@ -245,10 +268,8 @@ module Fastlane
|
|
245
268
|
item.dst_subfolder_spec = "10"
|
246
269
|
#勾上code sign on copy选项(默认是没勾上的)
|
247
270
|
item.files.each do |e|
|
248
|
-
|
249
|
-
|
250
|
-
e.settings["ATTRIBUTES"] = ["CodeSignOnCopy", "RemoveHeadersOnCopy"]
|
251
|
-
end
|
271
|
+
e.settings = Hash.new
|
272
|
+
e.settings["ATTRIBUTES"] = ["CodeSignOnCopy", "RemoveHeadersOnCopy"]
|
252
273
|
end
|
253
274
|
end
|
254
275
|
end
|
@@ -303,22 +324,33 @@ module Fastlane
|
|
303
324
|
schemefile = File.basename(new_schemefilepath, ".xcscheme")
|
304
325
|
end
|
305
326
|
end
|
306
|
-
lane_context[:project].save()
|
327
|
+
# lane_context[:project].save()
|
307
328
|
# Find.find(File.join(lane_context[:cha_project_path], "xcuserdata")) do |schemefilepath|
|
308
329
|
# if schemefilepath.include? ".xcscheme"
|
309
330
|
# schemefile = schemefilepath
|
310
331
|
# end
|
311
332
|
# end
|
312
|
-
|
313
333
|
# 执行 fastlane gym
|
334
|
+
# other_action.update_plist( # Updates the CLIENT_ID and GOOGLE_APP_ID string entries in the plist-file
|
335
|
+
# plist_path: File.join(lane_context[:zhuixi_path], "Info.plist"),
|
336
|
+
# block: proc do |plist|
|
337
|
+
# plist["CFBundleDisplayName"] = lane_context[:configParams]["gamename"]
|
338
|
+
# plist["CFBundleIdentifier"] = lane_context[:configParams]["gamePackageName"]
|
339
|
+
# end,
|
340
|
+
# )
|
341
|
+
lane_context[:project].save()
|
314
342
|
puts lane_context[:configParams]
|
315
343
|
timestamp = Time.now.strftime("%Y%m%d%H%M%S")
|
316
344
|
output_name = lane_context[:configParams]["gamename"] + "_" + lane_context[:platform_id].to_s + "_" + lane_context[:selectPlatformName] + "_" + timestamp
|
317
345
|
other_action.gym(
|
318
346
|
project: lane_context[:cha_project_path],
|
319
|
-
silent: true,
|
320
347
|
output_name: output_name,
|
321
|
-
|
348
|
+
export_method: lane_context[:export_method],
|
349
|
+
export_options: {
|
350
|
+
provisioningProfiles: {
|
351
|
+
lane_context[:configParams]["gamePackageName"] => lane_context[:provisioning_profile_name],
|
352
|
+
},
|
353
|
+
},
|
322
354
|
)
|
323
355
|
end
|
324
356
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-zhuixi_build_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedSevenMale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -169,7 +169,7 @@ files:
|
|
169
169
|
- lib/fastlane/plugin/zhuixi_build_app/actions/zhuixi_build_app_action.rb
|
170
170
|
- lib/fastlane/plugin/zhuixi_build_app/helper/zhuixi_build_app_helper.rb
|
171
171
|
- lib/fastlane/plugin/zhuixi_build_app/version.rb
|
172
|
-
homepage:
|
172
|
+
homepage: https://github.com/RedSevenMale/fastlane-plugin-zhuixi_build_app
|
173
173
|
licenses:
|
174
174
|
- MIT
|
175
175
|
metadata: {}
|