cocoapods-bb-PodAssistant 0.2.5 → 0.3.0

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: ab2705715a5d3a1fb1d3a9b67f74e24803ef31012292ff01ce65b15ec33b1402
4
- data.tar.gz: 2cc66113449ec295ecb88c99bcaaea6cdd4a277498c07924e656a652f79022ce
3
+ metadata.gz: 35d02b24a30633e891421f088d9fe05c17585e9b6db05f0c337a9468b980adf5
4
+ data.tar.gz: 4c7ac41d4a5f98ab346dfa587a686f079af075ef434df61e5441597f84f265f7
5
5
  SHA512:
6
- metadata.gz: d2df0329e92d8ba05f49d57386c147bd9577bbfc4e5c4704a8fcbd693929d237d709fe512d2593bd921b1a2f92958adacba6225cd3f7e0c73e1055241a4ad17e
7
- data.tar.gz: 70179167a38a24a9aab3a8bca075f0339a9a2597c00b669ec02437dcba7fcb929a419ee716e2ba3eaa64dc4322ca901422dde6ca2cfb70baab3164c73790d1ba
6
+ metadata.gz: 58d31747fb116514f4520aacf1b730d0503d7e5ca3ca136772488519871ae667dad4200fb05ae65938378e8c47268e86fad32275b794bea660a65227836eee8b
7
+ data.tar.gz: 32b9d36bf4238aaf709dc6bdad0feded1ba5845270d42089d6cae5490120a99a1695c755b4edffdf10c9b4b1f96f187dc6eaaa1f70320e3d4b19a9133ceb9e17
@@ -0,0 +1,32 @@
1
+ module Pod
2
+ class Config
3
+ attr_accessor :bb_idfa_flag
4
+ end
5
+ end
6
+
7
+ module Pod
8
+ class Installer
9
+ class Analyzer
10
+ class PodfileDependencyCache
11
+ alias_method :bb_origin_initialize, :initialize
12
+ def initialize(podfile_dependencies, dependencies_by_target_definition)
13
+ bb_origin_initialize(podfile_dependencies,dependencies_by_target_definition)
14
+
15
+ if @podfile_dependencies
16
+ @podfile_dependencies.each do |dep|
17
+ if dep.name.include?('/noidfa')
18
+ Pod::Config.instance.bb_idfa_flag = 'noidfa'
19
+ break
20
+ elsif dep.name.include?('/idfa')
21
+ Pod::Config.instance.bb_idfa_flag = 'idfa'
22
+ break
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+
@@ -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
@@ -1,3 +1,6 @@
1
+ # bbsadvert
2
+ require 'cocoapods-bb-PodAssistant/babybus/bbsadvert/podfile_dependency_cache.rb'
3
+
1
4
  #stable
2
5
  require 'cocoapods-bb-PodAssistant/command/stable'
3
6
  require 'cocoapods-bb-PodAssistant/babybus/stable/podfile-linkline'
@@ -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.5"
2
+ VERSION = "0.3.0"
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.5
4
+ version: 0.3.0
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-05 00:00:00.000000000 Z
11
+ date: 2024-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -90,6 +90,7 @@ files:
90
90
  - LICENSE.txt
91
91
  - README.md
92
92
  - lib/cocoapods-bb-PodAssistant.rb
93
+ - lib/cocoapods-bb-PodAssistant/babybus/bbsadvert/podfile_dependency_cache.rb
93
94
  - lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb
94
95
  - lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb
95
96
  - lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []
145
- rubygems_version: 3.4.22
146
+ rubygems_version: 3.4.21
146
147
  signing_key:
147
148
  specification_version: 4
148
149
  summary: A longer description of cocoapods-bb-PodAssistant.