cocoapods-bb-bin 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92aac3b42f5f900aa8994380291b97a8794502bb6983d850ce3bf3dc4ef005ee
4
- data.tar.gz: 7a103332b3845ba48a457b87a55e916afe4f8fe53e98e899a8f147e1785f90b7
3
+ metadata.gz: 35aca7dea61c61142b1eacf128996c1f165ef093cf13bb78b258c8db0405789c
4
+ data.tar.gz: 190ae0e9bb158819c764b8da68fe71af4b3c18f369a2889f47ebf45470d08f19
5
5
  SHA512:
6
- metadata.gz: 6236774e980f7e3455944cf3cc825a0c270cde86f489c60a294cef5308c0d35ebea030f7e1ff142cd9e7b7a07ccd2e623d97dde99852d5215d6e03ccedc91960
7
- data.tar.gz: fd318d8fe2f1a9c6b8bf749ebc0e13df80996b48b7435e33b206638b2908a2403a0d88a343acac3d1c43201befecc5f286fdfd907d8393c34ba5db6b9279d2c5
6
+ metadata.gz: d238db6291137bf5c11e007cbd8fe34878bc5825c287c0b90367e22e1813a9cd290cd8f743a141fc2d5df1fa99a0a7d28b8bf8fc598093c3a0f11bb0d2e9fb18
7
+ data.tar.gz: 9dd33e6134e4eb707d7e0468cb8655881b9b89affa0027c1dc33b9b53fcc59d776e349cdede9fc02086ff7bb5dca8068c83afbdcd8cf08ed3c818b56fa4538f2
@@ -165,8 +165,8 @@ module Pod
165
165
  "--verbose",
166
166
  *@additional_args
167
167
  ]
168
-
169
- if File.exist?(Pod::Config.instance.podfile_path)
168
+ podfile_path = Pod::Config.instance.podfile_path
169
+ if podfile_path && File.exist?(podfile_path)
170
170
  argvs += ['--use-podfile']
171
171
  end
172
172
 
@@ -30,11 +30,10 @@ module Pod
30
30
  if @help
31
31
  else
32
32
  puts "开始执行自动推送操作,"
33
- podfile_path = link_podfile # 创建软链接
34
-
35
33
  @env = argv.option('env') || 'dev'
36
34
  CBin.config.set_configuration_env(@env)
37
35
 
36
+ podfile_path = link_podfile # 创建软链接
38
37
  @podspec = argv.shift_argument || find_podspec
39
38
  @specification = Specification.from_file(@podspec)
40
39
 
@@ -200,6 +199,7 @@ module Pod
200
199
  end
201
200
  end
202
201
  end
202
+ raise Informative, "podspec File no exist, please check" unless name
203
203
  return name
204
204
  end
205
205
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
 
6
6
  module Pod
@@ -48,6 +48,10 @@ module CBin
48
48
 
49
49
  def Utils.uses_frameworks?
50
50
  uses_frameworks = false
51
+ podfile_path = Pod::Config.instance.podfile_path
52
+ unless podfile_path
53
+ return true
54
+ end
51
55
  Pod::Config.instance.podfile.target_definitions.each do |key,value|
52
56
  if key != "Pods"
53
57
  uses_frameworks = value.uses_frameworks?
@@ -186,7 +186,8 @@ module CBin
186
186
  archs = ios_architectures
187
187
  # archs = %w[arm64 armv7 armv7s]
188
188
  archs.map do |arch|
189
- xcodebuild(defines, "ARCHS=\'#{arch}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'","build-#{arch}",@build_model)
189
+ xcodebuild(defines, "-sdk iphoneos ARCHS=\'#{arch}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'","build-#{arch}",@build_model)
190
+ # xcodebuild(defines, "-sdk iphoneos ARCHS=\'#{arch}\' ","build-#{arch}",@build_model)
190
191
  end
191
192
  # else
192
193
  # xcodebuild(defines,options)
@@ -209,12 +210,12 @@ module CBin
209
210
  end
210
211
  end
211
212
 
212
- def xcodebuild(defines = '', args = '', build_dir = 'build', build_model = 'Debug')
213
-
213
+ def xcodebuild(defines = '', args = '', build_dir = 'build', build_model = 'Debug', configuration = 'Release')
214
+
214
215
  unless File.exist?("Pods.xcodeproj") #cocoapods-generate v2.0.0
215
- command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{build_model} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"
216
+ command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{configuration} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"
216
217
  else
217
- command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{build_model} -target #{target_name} -project ./Pods.xcodeproj 2>&1"
218
+ command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{configuration} -target #{target_name} -project ./Pods.xcodeproj 2>&1"
218
219
  end
219
220
 
220
221
  UI.message "command = #{command}"
@@ -333,6 +334,8 @@ module CBin
333
334
  if bundles.count > 0
334
335
  UI.message "Copying bundle files #{bundles}"
335
336
  bundle_files = bundles.join(' ')
337
+ raise Informative, "source resource bundle no exist #{bundle_files}" unless File.exist?(bundle_files)
338
+ UI.message "[build dir]Copying resources current_path:#{Dir.pwd} bundle_files:#{bundle_files} res_path:#{framework.resources_path}"
336
339
  `cp -rp #{bundle_files} #{framework.resources_path} 2>&1`
337
340
  end
338
341
 
@@ -344,7 +347,7 @@ module CBin
344
347
  end
345
348
  raise "copy_resources #{spec_source_dir} no exist " unless File.exist?(spec_source_dir)
346
349
 
347
- spec_source_dir = File.join(Dir.pwd,"#{@spec.name}")
350
+ # spec_source_dir = File.join(Dir.pwd,"#{@spec.name}") # 去除重复赋值,有些资源放在pods/组件目录下
348
351
  real_source_dir = spec_source_dir
349
352
  end
350
353
 
@@ -363,8 +366,10 @@ module CBin
363
366
  resources.each do |source|
364
367
  escape_resource << Shellwords.join(source)
365
368
  end
366
- UI.message "Copying resources #{escape_resource}"
367
- `cp -rp #{escape_resource.join(' ')} #{framework.resources_path}`
369
+ bundle_files = escape_resource.join(' ')
370
+ raise Informative, "source resource bundle no exist #{bundle_files}" unless File.exist?(bundle_files)
371
+ UI.message "[search dir]Copying resources current_path:#{Dir.pwd} bundle_files:#{bundle_files} res_path:#{framework.resources_path}"
372
+ `cp -rp #{bundle_files} #{framework.resources_path} 2>&1`
368
373
  end
369
374
  end
370
375
 
@@ -35,7 +35,7 @@ module Pod
35
35
  generator.podfile_plugins.each do |name, options|
36
36
  plugin(*[name, options].compact)
37
37
  end
38
-
38
+ Pod::UI::puts "====use_frameworks:#{generator.configuration.use_frameworks?}"
39
39
  use_frameworks!(generator.configuration.use_frameworks?)
40
40
 
41
41
  if (supported_swift_versions = generator.supported_swift_versions)
@@ -104,6 +104,10 @@ module Pod
104
104
  inhibit_all_warnings! if generator.inhibit_all_warnings?
105
105
  # use_modular_headers! if generator.use_modular_headers?
106
106
  # podfile 配置 use_frameworks! :linkage => :static 支持modulemap by hm 21/10/19
107
+ Pod::UI::puts "====use_frameworks_value:#{generator.use_frameworks_value}"
108
+ unless generator.use_frameworks_value
109
+ use_modular_headers! # 默认组件没有配置或者没有podfile,支持modulemap by hm 21/10/20
110
+ end
107
111
  if generator.use_modular_headers? || generator.use_frameworks_value.to_s == '{:linkage=>:static}'
108
112
  use_modular_headers!
109
113
  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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-19 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel