cocoapods-wxpodhook 0.0.6 → 0.0.7
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/cocoapods-wxpodhook/gem_version.rb +1 -3
- data/lib/cocoapods-wxpodhook/helper.rb +116 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 488743a035017c59a9539fd40bd76a5622f70591565faf52aac5e04154e9c577
|
4
|
+
data.tar.gz: 3fd6c385ec8e087fb6745b305a2f830f854412ed8252bd4e230030e54034728d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e8d305d576d611638d300d6fb8be79ce7b040f213fbc47f1195bbe8273d3fa9b87526e0325dad4168e7bb449073aa9a35cdff4ba1b9e1a51dbba353e34d7f70
|
7
|
+
data.tar.gz: f841600e01b19cc59720d3d47ae9c3f7f38b15d263f944f8017dbd9a4c594319ac304e3dab2cafcdea70ca0ad7aa7852406e3baac21f45dcbddd56e4a151c816
|
@@ -208,3 +208,119 @@ module Pod
|
|
208
208
|
end
|
209
209
|
end
|
210
210
|
end
|
211
|
+
|
212
|
+
# 使用Git浅克隆方式更新组件
|
213
|
+
module Pod
|
214
|
+
class Command
|
215
|
+
class UpdateFast < Command
|
216
|
+
self.summary = <<-SUMMARY
|
217
|
+
使用Git浅克隆方式更新组件,行为与pod update一致
|
218
|
+
SUMMARY
|
219
|
+
|
220
|
+
self.description = <<-DESC
|
221
|
+
使用Git浅克隆方式更新组件,行为与pod update一致,但使用Git浅克隆方式加快下载速度
|
222
|
+
DESC
|
223
|
+
|
224
|
+
self.arguments = [
|
225
|
+
CLAide::Argument.new('PODNAME', false, true)
|
226
|
+
]
|
227
|
+
|
228
|
+
def self.options
|
229
|
+
[
|
230
|
+
['--no-repo-update', '不更新spec仓库'],
|
231
|
+
].concat(super)
|
232
|
+
end
|
233
|
+
|
234
|
+
def initialize(argv)
|
235
|
+
@pod_names = argv.arguments!
|
236
|
+
@repo_update = argv.flag?('repo-update', true)
|
237
|
+
super
|
238
|
+
end
|
239
|
+
|
240
|
+
def run
|
241
|
+
before = Time.new
|
242
|
+
|
243
|
+
put_redMsg("开始使用浅克隆方式更新组件")
|
244
|
+
|
245
|
+
# 设置Git浅克隆环境变量
|
246
|
+
ENV['GIT_CLONE_ARGS'] = '--depth=1'
|
247
|
+
|
248
|
+
# 执行pod update命令
|
249
|
+
repo_update_flag = @repo_update ? '' : '--no-repo-update'
|
250
|
+
|
251
|
+
if @pod_names.empty?
|
252
|
+
# 如果没有指定pod名称,则更新所有pod
|
253
|
+
system("pod update #{repo_update_flag}")
|
254
|
+
else
|
255
|
+
# 如果指定了pod名称,则只更新指定的pod
|
256
|
+
pod_names_str = @pod_names.join(" ")
|
257
|
+
system("pod update #{pod_names_str} #{repo_update_flag}")
|
258
|
+
end
|
259
|
+
|
260
|
+
# 恢复Git克隆环境变量
|
261
|
+
ENV.delete('GIT_CLONE_ARGS')
|
262
|
+
|
263
|
+
now = Time.new();
|
264
|
+
time = now.to_i - before.to_i;
|
265
|
+
|
266
|
+
put_redMsg("组件更新完毕,共耗时 #{time}秒")
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# 使用Git浅克隆方式安装组件
|
273
|
+
module Pod
|
274
|
+
class Command
|
275
|
+
class InstallFast < Command
|
276
|
+
self.summary = <<-SUMMARY
|
277
|
+
使用Git浅克隆方式安装组件,行为与pod install一致
|
278
|
+
SUMMARY
|
279
|
+
|
280
|
+
self.description = <<-DESC
|
281
|
+
使用Git浅克隆方式安装组件,行为与pod install一致,但使用Git浅克隆方式加快下载速度
|
282
|
+
DESC
|
283
|
+
|
284
|
+
def self.options
|
285
|
+
[
|
286
|
+
['--no-repo-update', '不更新spec仓库'],
|
287
|
+
['--no-integrate', '不集成到Xcode项目中'],
|
288
|
+
['--repo-update', '强制更新spec仓库'],
|
289
|
+
].concat(super)
|
290
|
+
end
|
291
|
+
|
292
|
+
def initialize(argv)
|
293
|
+
@repo_update = argv.flag?('repo-update')
|
294
|
+
@no_repo_update = argv.flag?('no-repo-update', !@repo_update)
|
295
|
+
@no_integrate = argv.flag?('no-integrate')
|
296
|
+
super
|
297
|
+
end
|
298
|
+
|
299
|
+
def run
|
300
|
+
before = Time.new
|
301
|
+
|
302
|
+
put_redMsg("开始使用浅克隆方式安装组件")
|
303
|
+
|
304
|
+
# 设置Git浅克隆环境变量
|
305
|
+
ENV['GIT_CLONE_ARGS'] = '--depth=1'
|
306
|
+
|
307
|
+
# 构建命令参数
|
308
|
+
args = []
|
309
|
+
args << '--no-repo-update' if @no_repo_update
|
310
|
+
args << '--no-integrate' if @no_integrate
|
311
|
+
args << '--repo-update' if @repo_update
|
312
|
+
|
313
|
+
# 执行pod install命令
|
314
|
+
system("pod install #{args.join(' ')}")
|
315
|
+
|
316
|
+
# 恢复Git克隆环境变量
|
317
|
+
ENV.delete('GIT_CLONE_ARGS')
|
318
|
+
|
319
|
+
now = Time.new();
|
320
|
+
time = now.to_i - before.to_i;
|
321
|
+
|
322
|
+
put_redMsg("组件安装完毕,共耗时 #{time}秒")
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-wxpodhook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- lishuaishuai01@tal.com
|
44
44
|
executables: []
|
@@ -54,7 +54,7 @@ homepage: https://github.com/EXAMPLE/cocoapods-wxpodhook
|
|
54
54
|
licenses:
|
55
55
|
- MIT
|
56
56
|
metadata: {}
|
57
|
-
post_install_message:
|
57
|
+
post_install_message:
|
58
58
|
rdoc_options: []
|
59
59
|
require_paths:
|
60
60
|
- lib
|
@@ -69,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
73
|
-
signing_key:
|
72
|
+
rubygems_version: 3.5.18
|
73
|
+
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: 网校GitHooks
|
76
76
|
test_files: []
|