cocoapods-bb-PodAssistant 0.2.0 → 0.2.1
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: 46f2909212dda4283465cfe1db2a4b2311ed002e97f5c64290129b75a3f96c85
|
4
|
+
data.tar.gz: b11851246802d6000005ebbc23cbdf19687de70805896ccae2915963aa8aca49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa134b6cc558192b7b864c4872592299dc70efd9a1c58786e53048fbd0e6a7967e8d167467353002b700808249c1d390fbcba938b73dc9215ac7b9d45e28d5e2
|
7
|
+
data.tar.gz: 3bff44bfca25a276653939eb3575b6872221a8412a3d3b717c9f1acfb3f566a5a65758226c04f992aae1f1dcef60390e39015e4770237457d3aa7282b9d7b650
|
@@ -21,13 +21,14 @@ module Pod
|
|
21
21
|
|
22
22
|
def self.options
|
23
23
|
[
|
24
|
-
['--
|
24
|
+
['--force', '强制更新组件,突破stable版本限制'],
|
25
25
|
].concat(super)
|
26
26
|
end
|
27
27
|
|
28
28
|
def initialize(argv)
|
29
29
|
@pods = argv.arguments!
|
30
30
|
@sync = argv.flag?('sync', true)
|
31
|
+
@force = argv.flag?('force', true)
|
31
32
|
super
|
32
33
|
end
|
33
34
|
|
@@ -38,7 +39,7 @@ module Pod
|
|
38
39
|
# verify_podfile_exists! # 系统提供api验证podfile是否ok
|
39
40
|
if @sync
|
40
41
|
puts "[PodAssistant] 需要同步组件信息#{@pods}".green
|
41
|
-
source_manager.merge_stable_data(@pods)
|
42
|
+
source_manager.merge_stable_data(@pods, @force)
|
42
43
|
end
|
43
44
|
podStartTime = Time.new
|
44
45
|
update_spec
|
@@ -121,9 +121,9 @@ module BB
|
|
121
121
|
end
|
122
122
|
|
123
123
|
# 合并stable数据,参数,支持传入更新某几个数据
|
124
|
-
def merge_stable_data(update_pods=[])
|
124
|
+
def merge_stable_data(update_pods=[], is_force = false)
|
125
125
|
#4、show origin_stable_lock diff with local_stable_lock
|
126
|
-
new_stable_spec = compare_specs(fetch_local_stable_datas, fetch_origin_stable_datas, update_pods)
|
126
|
+
new_stable_spec = compare_specs(fetch_local_stable_datas, fetch_origin_stable_datas, update_pods, is_force)
|
127
127
|
|
128
128
|
#5、rewirte local_stable_lock with origin_stable_lock
|
129
129
|
update_localstable_datas(new_stable_spec)
|
@@ -191,7 +191,7 @@ module BB
|
|
191
191
|
update_dependencies_and_remove_data(business_stable_yaml, business_stable_datas, dependencies_pods, remove_pods)
|
192
192
|
end
|
193
193
|
# compare specs 参数1:本地,参数2:远端,参数3:指定更新pod库
|
194
|
-
def compare_specs(local_specs, common_specs, update_pods=[])
|
194
|
+
def compare_specs(local_specs, common_specs, update_pods=[], is_force = false)
|
195
195
|
added_projects = []
|
196
196
|
updated_projects = []
|
197
197
|
rollbacked_projects = []
|
@@ -271,6 +271,17 @@ module BB
|
|
271
271
|
new_specs.delete(name)
|
272
272
|
end
|
273
273
|
showMergeLog(added_projects, updated_projects, rollbacked_projects, deleted_projects)
|
274
|
+
# step.4 强制更新组件
|
275
|
+
if is_force == true
|
276
|
+
puts "强制升级组件#{update_pods}".red
|
277
|
+
update_pods.each do |pod_name|
|
278
|
+
pod = new_specs[pod_name]
|
279
|
+
if (pod.is_a? String) && !pod.include?('>=')
|
280
|
+
puts "强制升级name:#{pod_name} (>= #{pod})".red
|
281
|
+
new_specs[pod_name] = ">= #{pod}"
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
274
285
|
# puts "new_specs:#{new_specs}".send(:red)
|
275
286
|
return new_specs
|
276
287
|
end
|