cocoapods-bb-PodAssistant 0.2.4 → 0.2.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: 851510d43204035472ba42588285dfca96ebcae58634fcccb5564e71406859db
4
- data.tar.gz: 90e0f2ce973f28c45cdea8b1a84aab9ad93beeed46437458a923be7a6cfa4919
3
+ metadata.gz: a2f479136e8df55d4ac4833cbd6542fc65bb11cc5e5ea2ef137806cde3103c30
4
+ data.tar.gz: a6487fd194b8b54792a917285a8ee9daf10bc9b5d626addb6e8e79b500783aaf
5
5
  SHA512:
6
- metadata.gz: dd40530af31653714e3c8b8949d126bf95ff69e8ac101b48d3f8f5e95c4dc47c51e2ed73a01318c82c14b92a9593ba1a9f065e692e539bd034ec1bc91f040a15
7
- data.tar.gz: 326233f7ef2bf52ba116773a84e1b0a98087b2d78af90f40c75c3f8d7c64bb12fa95893355d521e308c4075eaea03e2ae50ff05180932543836361a968338f77
6
+ metadata.gz: a519bee2c0a2a0bfb407fe9b609882709c29321826222482576d0959472c73e39c6b7dbbc492c738530c951aa9cc8e8cf971162d176f7c52f1b04ee69f27b2c8
7
+ data.tar.gz: 954b121cfd5949fac4349ce3db307d3cb83a3e656765efaa9f0c33834158a3002466dd11fb00f7a3f7315ff31b6a69dfe19d920224acd9c1247ab4d6d7334c9f
@@ -48,6 +48,7 @@ module Pod
48
48
  # puts "pwd:#{`pwd`}".green
49
49
  path = @is_matrix ? matrix_stable_path : common_stable_path
50
50
  Dir.chdir(File.join(path)) {
51
+ commit_msg = ""
51
52
  if @pods.any?
52
53
  if (@pods.length > 1) && (@dependencies)
53
54
  puts "❌ 无效指令,不能处理多个组件#{@pods}依赖,更新组件仅支持单组件".red
@@ -69,6 +70,7 @@ module Pod
69
70
  end
70
71
  pods_str = @pods.join(" ")
71
72
  system "pod stable update #{pods_str}"
73
+ commit_msg = "update pod #{pods_str}"
72
74
  else
73
75
  if (@dependencies) || (@remove)
74
76
  puts "❌ 无效指令,没有制定组件名称 详见 pod stable push --help".red
@@ -77,6 +79,8 @@ module Pod
77
79
  end
78
80
  system "pod stable update"
79
81
  end
82
+ # 提交spec本地lock依赖,避免pod stable push <组件>出现组件版本回退问题
83
+ source_manager.commit_localspec_data(@is_matrix, commit_msg)
80
84
  }
81
85
  }
82
86
  end
@@ -45,6 +45,10 @@ module Pod
45
45
  podStartTime = Time.new
46
46
  update_spec
47
47
  if @pods.any?
48
+ if !File.exist?(File.join(Dir.pwd,"Podfile.lock"))
49
+ puts "工程第一次先执行pod 初始化 pod install"
50
+ system "pod install"
51
+ end
48
52
  pods_str = @pods.join(" ")
49
53
  system "pod update #{pods_str}"
50
54
  else
@@ -186,7 +186,7 @@ module BB
186
186
  puts "dependenciesdata:#{dependenciesdata} count:#{dependenciesdata.length}".red
187
187
  # 提交依赖/移除数据
188
188
  if removedata.length > 0 || dependenciesdata.length > 0
189
- @stableMgr.commit_data(stable_yaml, "dependencies:#{dependenciesdata} remove:#{removedata}")
189
+ commit_git_data(stable_yaml, "dependencies:#{dependenciesdata} remove:#{removedata}")
190
190
  end
191
191
  end
192
192
  end
@@ -196,6 +196,17 @@ module BB
196
196
  def update_business_dependencies_and_remove_data(dependencies_pods, remove_pods)
197
197
  update_dependencies_and_remove_data(business_stable_yaml, business_stable_datas, dependencies_pods, remove_pods)
198
198
  end
199
+ def commit_localspec_data(is_matrix, commit_msg)
200
+ if is_matrix
201
+ stable_yaml = business_stable_yaml
202
+ else
203
+ stable_yaml = public_stable_yaml
204
+ end
205
+ commit_git_data(stable_yaml, commit_msg)
206
+ end
207
+ def commit_git_data(stable_yaml, commit_msg)
208
+ @stableMgr.commit_data(stable_yaml, commit_msg)
209
+ end
199
210
  # compare specs 参数1:本地,参数2:远端,参数3:指定更新pod库
200
211
  def compare_specs(local_specs, common_specs, update_pods=[], is_force = false)
201
212
  added_projects = []
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBbPodassistant
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -27,7 +27,6 @@ module BB
27
27
  end
28
28
  # 提交数据
29
29
  def commit_data(yml_path, commit_msg="")
30
- puts "commit_stable_lock commit_msg:#{commit_msg}".red
31
30
  commit_stable_lock_data(yml_path, commit_msg)
32
31
  end
33
32
 
@@ -72,7 +71,7 @@ module BB
72
71
  private def commit_stable_lock_data(yml_path, commit_msg="")
73
72
  yml_name = File.basename(yml_path)
74
73
  # `cd #{cachePath}; git pull --all; git add #{yml_name}; git commit -m "[update] 更新stable配置文件#{yml_name}"; git push; git pull --all;`
75
- `cd #{cachePath}; git pull --all; git add * ; git commit -m "[update] 更新stable配置文件#{yml_name} #{commit_msg}"; git push; git pull --all;`
74
+ `cd #{cachePath} && git pull --all && git add . && git commit -m "[update] 更新stable配置文件#{yml_name} #{commit_msg}" && git push && git pull --all;`
76
75
  end
77
76
  private def update_local_stable_lock(yml_path, pod_targets)
78
77
  # step.1 更新yaml配置文件
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-PodAssistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-04 00:00:00.000000000 Z
11
+ date: 2023-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core