cocoapods-bb-bin 0.1.2 → 0.1.3

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: abf3c1facb5d301e2fbdf30d8091de9d674026db33372f938e2426f8f0569a02
4
- data.tar.gz: 8903e301d0b10e022caaa446bd024484fd38dff0bf108ce91176f413235c44f8
3
+ metadata.gz: bfa99d11781fa490e65319ac92df2deaaafb3e3699083f85902dc92c0c27356f
4
+ data.tar.gz: 20fce8c4f449fafbbf33eba9299339210345cc34cbe32f54719489f89a3ff96b
5
5
  SHA512:
6
- metadata.gz: 126987648cd78d14eb7e7b02c3fee4acefc1d04e0b087782d4a4cb297eca18bb18a98b5890e8fb25bccfe75731fbe35cd0ec5f63aea1c2f6d9cb34ef4651136a
7
- data.tar.gz: ac8e6707ff20706d16160ccfd5e19eb32863fc1510b09a272b52cceded9470eca84d33f02283026e7ffe568046a3c0da83b0ecdea2e5b63c5ed4850bacd5a46b
6
+ metadata.gz: 763267a56441687a3f66ef7fabebdfaba1e6548c803a18385091708c5db46053237300b244dd21ba4c27d054b050f793ab40b18bff723fa4d7a2209ac6d4ea87
7
+ data.tar.gz: 79ea50813de7d687eef1e9acd95f21ce72b0dcdf18dde3116fb1c4610ac96d3fe2c1deec89964cd622442753f05cc7468e1f9feb4138db5e25951d25486448af
@@ -203,6 +203,8 @@ module Pod
203
203
  return name
204
204
  end
205
205
 
206
+ private
207
+
206
208
  # podfile创建软链接
207
209
  def link_podfile
208
210
  current_path = Pathname.pwd
@@ -210,16 +212,35 @@ module Pod
210
212
  if filename == 'Podfile'
211
213
  filepath = File.join(current_path,"#{filename}")
212
214
  return filepath
215
+ else
216
+ if filename != "." and filename != ".."
217
+ filepath = File.join(current_path,"#{filename}")
218
+ if File.directory?(filepath)
219
+ # 二级目录遍历Podfile
220
+ Dir.foreach(filepath) do |filename|
221
+ if filename == 'Podfile'
222
+ podfile_path = File.join(filepath,"#{filename}")
223
+ create_link(podfile_path, current_path)
224
+ return podfile_path
225
+ end
226
+ end
227
+ end
228
+ end
213
229
  end
214
230
  end
215
231
  # 没有找到podfile(小组件)
216
232
  podfile_path = File.join(current_path,"Example/Podfile")
217
233
  if File.file?(podfile_path)
218
- system("ln -s #{podfile_path} #{current_path}")
219
- UI.warn "创建软链接 podfile:#{podfile_path} link:#{current_path}"
234
+ create_link(podfile_path, current_path)
235
+ end
236
+ end
237
+
238
+ def create_link(source_file, dest_file)
239
+ if File.file?(source_file)
240
+ system("ln -s #{source_file} #{dest_file}")
241
+ UI.puts "创建软链接 source:#{source_file} link:#{dest_file}"
220
242
  end
221
243
  end
222
-
223
244
  end
224
245
  end
225
246
  end
@@ -30,7 +30,7 @@ module CBin
30
30
  @ignore_git_list = config['ignore-git-list']
31
31
  UI.warn "====== ignore_git_list = #{@ignore_git_list}" if @ignore_git_list
32
32
  @ignore_http_list = config['ignore-http-list']
33
-
33
+ UI.warn "====== ignore-http-list = #{@ignore-http-list}" if @ignore-http-list
34
34
  @xcode_build_name = config['xcode_build_path']
35
35
  @root_dir = config['root_dir'] unless config['root_dir'].nil?
36
36
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
 
6
6
  module Pod
@@ -10,6 +10,9 @@ module CBin
10
10
  if Utils.uses_frameworks?
11
11
  return true
12
12
  end
13
+ if Utils.is_generate_frameworks(spec)
14
+ return true
15
+ end
13
16
 
14
17
  return Utils.is_swift_module(spec)
15
18
  end
@@ -57,6 +60,23 @@ module CBin
57
60
  return uses_frameworks
58
61
  end
59
62
 
63
+ def Utils.is_generate_frameworks(spec)
64
+ # framework
65
+ zip_file = CBin::Config::Builder.instance.framework_zip_file(spec) + ".zip"
66
+ res = File.exist?(zip_file)
67
+ Pod::UI::puts "zip_file = #{zip_file}"
68
+ unless res
69
+ # xcframework
70
+ zip_file = CBin::Config::Builder.instance.xcframework_zip_file(spec) + ".zip"
71
+ res = File.exist?(zip_file)
72
+ Pod::UI::puts "zip_file = #{zip_file}"
73
+ end
74
+ if res
75
+ is_framework = true
76
+ end
77
+ return is_framework
78
+ end
79
+
60
80
  end
61
81
 
62
82
  end
@@ -22,8 +22,10 @@ module CBin
22
22
  def create
23
23
  # spec = nil
24
24
  if CBin::Build::Utils.is_framework(@code_spec)
25
+ Pod::UI::puts "make framework spec"
25
26
  spec = create_framework_from_code_spec
26
27
  else
28
+ Pod::UI::puts "make source code spec"
27
29
  spec = create_from_code_spec
28
30
  end
29
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin