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: d20d9d58e270471cf2c4f2c67680ac357bfe3a9bc98bfff584365aa7c7880ccc
4
- data.tar.gz: b9ae69a6fe68492eb9e60a9fd8f18bd128a983c05f2652f5bd4e256434965b2a
3
+ metadata.gz: 46f2909212dda4283465cfe1db2a4b2311ed002e97f5c64290129b75a3f96c85
4
+ data.tar.gz: b11851246802d6000005ebbc23cbdf19687de70805896ccae2915963aa8aca49
5
5
  SHA512:
6
- metadata.gz: fdb0cbecbf00a7e12b86a39f912516361edf310c261508a494b6126c9122ab79e737c6ee5c821b3ae2fd871bbbc2309c0aa664b0c8a94fa489588e13e0cea645
7
- data.tar.gz: 6d2727972ff6356bca684ff3e7a9b6339d43e9e2fcf2952daada97c668712a9308cb37eb08e55bc38f7ad769aaeb7d4150241c12df3bc363c053839129ce58c9
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
- ['--sync', '立即同步远端yml配置,更新组件信息'],
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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -272,7 +272,7 @@ module BB
272
272
  end
273
273
  end
274
274
  stable_hash[podName] = pod
275
- puts "[PodAssistant] merge pod #{podName} #{pod}"
275
+ # puts "[PodAssistant] merge pod #{podName} #{pod}"
276
276
  end
277
277
  else
278
278
  puts "[PodAssistant] 本地stable数据无变化<===完成".yellow
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-PodAssistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin