cocoapods-bb-bin 0.2.7.2 → 0.2.7.4

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: 2ba27ee353fb8afc8faf34326241d9021adad83317e7eae1b65d9765c4d53a10
4
- data.tar.gz: d62111b697e6b0b29d70ba181a1b37b48a7e46a61a7af31c33b9555785126b5b
3
+ metadata.gz: 80c0429394d3ce85918c28ebcfa8f817aade2bb2309a73a980e447d6af6f48e8
4
+ data.tar.gz: d4c3794d17b0950d9279e460fedc9eb628adf299cfcc5851e95311e8bdefdba8
5
5
  SHA512:
6
- metadata.gz: 1ddb6ee604a94a15cc9687fada3e2b7da2286ca8e21b7d9dc11485b635f57447b5b07d72adbdf15a8f4b8025a5c53121fedbbf40265e09b3437437be30ca8c12
7
- data.tar.gz: 87051230e4b8b3a5f4b09690203e11bc6490a6919425a733aa32a662d3fcae5a8f5261b8a449a941f09968eb06883d91832b9a6273d16582d61a536e1d6207e8
6
+ metadata.gz: 0a78ad44d84637689c249ad3a210ce467c0f2c0c95b9159710f6d621c902d13ef8077b751a124d1d7682083bd8ce019c1c3613b06192285d2d291c004922de5c
7
+ data.tar.gz: c0f9294119b2f5662422c95e7a6073e1c39a010e5a3e41703c0b6050fb6d47420e290cb3f2a25575095c25c5e53f2181b8b41ce5311dec5be647c06dcaa9b8ba
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.2.7.2'
3
+ VERSION = '0.2.7.4'
4
4
  end
5
5
 
6
6
  module Pod
@@ -23,7 +23,9 @@ module CBin
23
23
  end
24
24
 
25
25
  def upload(isGenDylib=false)
26
- return upload_binary_file(own_source_binary_file, isGenDylib, @spec.name)
26
+ Dir.chdir(CBin::Config::Builder.instance.root_dir) do
27
+ return upload_binary_file(own_source_binary_file, isGenDylib, @spec.name)
28
+ end
27
29
  end
28
30
 
29
31
  def upload_binary_file(zip_file, isGenDylib=false, vendored_framework_name=nil)
@@ -96,6 +96,8 @@ module Pod
96
96
  specs_by_target = old_resolver_specs_by_target.bind(self).call
97
97
 
98
98
  sources_manager = Config.instance.sources_manager
99
+ binary_source = sources_manager.binary_source
100
+ code_source = sources_manager.code_source
99
101
  use_source_pods = podfile.use_source_pods
100
102
 
101
103
  missing_binary_specs = []
@@ -123,11 +125,10 @@ module Pod
123
125
 
124
126
  # 采用二进制依赖并且不为开发组件
125
127
  use_binary = use_binary_rspecs.include?(rspec)
126
- source = use_binary ? sources_manager.binary_source : sources_manager.code_source
127
-
128
+ source = use_binary ? binary_source : code_source
128
129
  spec_version = rspec.spec.version
129
- # UI.message 'cocoapods-bb-bin 插件'
130
- # UI.message "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
130
+ # UI.puts 'cocoapods-bb-bin 插件'
131
+ # UI.puts "- 开始处理 #{rspec.spec.name} #{spec_version} 组件."
131
132
 
132
133
  begin
133
134
  # 从新 source 中获取 spec,在bin archive中会异常,因为找不到
@@ -9,25 +9,52 @@ module Pod
9
9
 
10
10
  def initLibEnv(isGenDylib=false)
11
11
  @dylib = isGenDylib
12
+ UI.puts "初始化源环境support dylib:#{isGenDylib}"
12
13
  end
13
14
 
14
15
  # 源码 source
15
16
  def code_source
16
- if @dylib # 动态库
17
+ if supportDylibSource # 动态库
17
18
  source_with_name_or_url(CBin.config.sourceV2_repo_url)
18
19
  else # 静态库
19
20
  source_with_name_or_url(CBin.config.code_repo_url)
20
21
  end
21
22
  end
22
23
 
24
+ # 静态库二进制源
25
+ def static_binary_source
26
+ source_with_name_or_url(CBin.config.binary_repo_url)
27
+ end
28
+ # 动态库二进制源
29
+ def dylib_binary_source
30
+ source_with_name_or_url(CBin.config.dylib_repo_url)
31
+ end
32
+
23
33
  # 二进制 source (区分动态库还是静态库)
24
34
  def binary_source
25
- if @dylib # 动态库
26
- source_with_name_or_url(CBin.config.dylib_repo_url)
27
- else # 静态库
28
- source_with_name_or_url(CBin.config.binary_repo_url)
35
+ return supportDylibSource ? dylib_binary_source : static_binary_source
36
+ end
37
+
38
+ # 是否支持动态库
39
+ def supportDylibSource
40
+ if @dylib
41
+ return true
42
+ else
43
+ # 优先解析podfile中source动态配置是否添加动态库源
44
+ podfile = Pod::Config.instance.podfile
45
+ if podfile
46
+ dylib_source = CBin.config.dylib_repo_url
47
+ podfile.sources.map do |source|
48
+ if source === dylib_source
49
+ UI.puts "切换到动态库源:#{dylib_binary_source}"
50
+ return true
51
+ end
52
+ end
53
+ end
54
+ return false
29
55
  end
30
56
  end
57
+
31
58
  end
32
59
  end
33
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7.2
4
+ version: 0.2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubygems_version: 3.4.14
209
+ rubygems_version: 3.4.19
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: cocoapods-bb-bin is a plugin which helps develpers switching pods between