cocoapods-fy-bin 0.1.0 → 0.1.1

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: c74b770ea4b7bbe73552a6e712806ecfeb15f5577f5af3ceaf9e32b2c7ca572c
4
- data.tar.gz: c0214a11e1d99cd967c761435a97b8fff1b10279bdba3bdb0030295c76ebb8e0
3
+ metadata.gz: 903d552160f64b602e42d047b1fe988fa929552de5367eec788a8504aa728f8f
4
+ data.tar.gz: a4dea89c78f4f46bcdaf23727edc749985bcf005ad2e259d0fca24a6e66a6c73
5
5
  SHA512:
6
- metadata.gz: 9b24eea4630d9d98291eb273fe40f0063d9c22a703461f88e05507d81de51211c41ba642a72872e850cc6c39bac8872b28b9a1bea23fbab2e727e5af4e4f3a21
7
- data.tar.gz: d19f8b103b16f37de2a8fb3c0e2fefed7bf7fccd3118d05fec05ad7679c6d0d46b75ede01bcddb6de190e6498690ab3e7a6cba68936ca26c6fe03a430279faba
6
+ metadata.gz: 63973a62bbe459379dd395d2115c063839d4dce25c9262f4809ab00cd1a17623f664965a972ffd1ef26322c550d07717db84a471d75bd8e53f92836d39aa777d
7
+ data.tar.gz: 82f61369e2eaa1159b8f13bb51fb12b1c033c13ed6e86cfbe68d1caf18af0a6d6cac7da9eb7cb80dcc17d22cc5e265435709e0a930057e66cd27936b653d8a42
@@ -32,7 +32,7 @@ module Pod
32
32
  ['--configuration', 'Build the specified configuration (e.g. Debug). Defaults to Release'],
33
33
  ['--env', "该组件上传的环境 %w[debug release]"],
34
34
  ['--archs', "需要二进制组件的架构"],
35
- ['--pre_build_shells', "xcodebuild前的脚本命令"]
35
+ ['--pre_build_shell', "xcodebuild前的脚本命令"]
36
36
  ].concat(Pod::Command::Gen.options).concat(super).uniq
37
37
  end
38
38
 
@@ -55,7 +55,7 @@ module Pod
55
55
  @sources = argv.option('sources') || []
56
56
  @platform = Platform.new(:ios)
57
57
  @archs = argv.option('archs', 'armv7,arm64')
58
- @pre_build_shells = argv.option('pre_build_shells', '')
58
+ @pre_build_shell = argv.option('pre_build_shell') || ''
59
59
  @config = argv.option('configuration', 'Release')
60
60
 
61
61
  @framework_path
@@ -90,7 +90,7 @@ module Pod
90
90
  @zip,
91
91
  @spec,
92
92
  @archs,
93
- @pre_build_shells,
93
+ @pre_build_shell,
94
94
  CBin::Config::Builder.instance.white_pod_list.include?(@spec.name),
95
95
  @config)
96
96
  builder.build
@@ -22,7 +22,7 @@ module Pod
22
22
  ['--configuration', 'Build the specified configuration (e.g. Release ). Defaults to Debug'],
23
23
  ['--env', "该组件上传的环境 %w[debug release]"],
24
24
  ['--archs', "需要二进制组件的架构"],
25
- ['--pre_build_shells', "xcodebuild前的脚本命令"]
25
+ ['--pre_build_shell', "xcodebuild前的脚本命令"]
26
26
  ].concat(Pod::Command::Gen.options).concat(super).uniq
27
27
  end
28
28
 
@@ -40,7 +40,7 @@ module Pod
40
40
  @all_make = argv.flag?('all-make', false)
41
41
  @verbose = argv.flag?('verbose', true)
42
42
  @archs = argv.flag?('archs', 'arm64')
43
- @pre_build_shells = argv.flag?('pre_build_shells', '')
43
+ @pre_build_shell = argv.option('pre_build_shell') || ''
44
44
  @config = argv.option('configuration', 'Debug')
45
45
  @additional_args = argv.remainder!
46
46
 
@@ -128,8 +128,8 @@ module Pod
128
128
  if @archs
129
129
  argvs += ["--archs=#{@archs}"]
130
130
  end
131
- if @pre_build_shells
132
- argvs += ["--pre_build_shells=#{@pre_build_shells}"]
131
+ if @pre_build_shell
132
+ argvs += ["--pre_build_shell=#{@pre_build_shell}"]
133
133
  end
134
134
  argvs += ["--configuration=#{@config}"]
135
135
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
 
6
6
  module Pod
@@ -20,7 +20,7 @@ module CBin
20
20
  zip,
21
21
  rootSpec,
22
22
  archs,
23
- pre_build_shells,
23
+ pre_build_shell,
24
24
  skip_archive = false,
25
25
  build_model="Release")
26
26
  @spec = spec
@@ -29,7 +29,7 @@ module CBin
29
29
  @rootSpec = rootSpec
30
30
  @isRootSpec = rootSpec.name == spec.name
31
31
  @archs = archs
32
- @pre_build_shells = pre_build_shells
32
+ @pre_build_shell = pre_build_shell
33
33
  @skip_archive = skip_archive
34
34
  @framework_output = framework_output
35
35
  @zip = zip
@@ -58,7 +58,7 @@ module CBin
58
58
  source_dir = Dir.pwd
59
59
  file_accessor = Sandbox::FileAccessor.new(Pathname.new('.').expand_path, @spec.consumer(@platform))
60
60
  Dir.chdir(workspace_directory) do
61
- builder = CBin::Framework::Builder.new(@spec, file_accessor, @platform, source_dir, @archs, @pre_build_shells, @isRootSpec, @build_model)
61
+ builder = CBin::Framework::Builder.new(@spec, file_accessor, @platform, source_dir, @archs, @pre_build_shell, @isRootSpec, @build_model)
62
62
  @@build_defines = builder.build if @isRootSpec
63
63
  begin
64
64
  @framework_path = builder.lipo_build(@@build_defines) unless @skip_archive
@@ -72,7 +72,7 @@ module CBin
72
72
  source_dir = zip_dir
73
73
  file_accessor = Sandbox::FileAccessor.new(Pathname.new('.').expand_path, @spec.consumer(@platform))
74
74
  Dir.chdir(workspace_directory) do
75
- builder = CBin::Library::Builder.new(@spec, file_accessor, @platform, source_dir , @archs, @pre_build_shells, @framework_path)
75
+ builder = CBin::Library::Builder.new(@spec, file_accessor, @platform, source_dir , @archs, @pre_build_shell, @framework_path)
76
76
  builder.build
77
77
  end
78
78
  end
@@ -10,7 +10,7 @@ module CBin
10
10
  class Builder
11
11
  include Pod
12
12
  #Debug下还待完成
13
- def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shells, isRootSpec = true, build_model="Debug")
13
+ def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shell, isRootSpec = true, build_model="Debug")
14
14
  @spec = spec
15
15
  @source_dir = source_dir
16
16
  @file_accessor = file_accessor
@@ -18,7 +18,7 @@ module CBin
18
18
  @build_model = build_model
19
19
  @isRootSpec = isRootSpec
20
20
  @archs = archs
21
- @pre_build_commands = pre_build_shells
21
+ @pre_build_shell = pre_build_shell
22
22
  #vendored_static_frameworks 只有 xx.framework 需要拼接为 xx.framework/xx by slj
23
23
  vendored_static_frameworks = file_accessor.vendored_static_frameworks.map do |framework|
24
24
  path = framework
@@ -75,7 +75,7 @@ module CBin
75
75
 
76
76
  # archs = %w[i386 x86_64]
77
77
  archs = ios_architectures_sim
78
- pre_build_shell
78
+ pre_build_command
79
79
  archs.map do |arch|
80
80
  xcodebuild(defines, "-sdk iphonesimulator ARCHS=\'#{arch}\' ", "build-#{arch}",@build_model)
81
81
  end
@@ -176,7 +176,7 @@ module CBin
176
176
  # if is_debug_model
177
177
  archs = ios_architectures
178
178
  # archs = %w[arm64 armv7 armv7s]
179
- pre_build_shell
179
+ pre_build_command
180
180
  archs.map do |arch|
181
181
  # -fembed-bitcode支持bitcode BUILD_LIBRARY_FOR_DISTRIBUTION=YES 构建向后兼容的framework
182
182
  xcodebuild(defines, "ARCHS=\'#{arch}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\' DEBUG_INFORMATION_FORMAT=\'dwarf-with-dsym\' BUILD_LIBRARY_FOR_DISTRIBUTION=YES","build-#{arch}",@build_model)
@@ -203,9 +203,8 @@ module CBin
203
203
  end
204
204
 
205
205
  # 编译前需执行的的shell脚本
206
- def pre_build_shell
207
- @pre_build_commands.each do |command_arg|
208
- command = "sh #{command_arg}"
206
+ def pre_build_command
207
+ command = "sh #{@pre_build_shell}"
209
208
  puts command
210
209
  UI.message "command = #{command}"
211
210
  output = `#{command}`.lines.to_a
@@ -219,7 +218,6 @@ module CBin
219
218
 
220
219
  Process.exit
221
220
  end
222
- end
223
221
  end
224
222
 
225
223
  def xcodebuild(defines = '', args = '', build_dir = 'build', build_model = 'Debug')
@@ -11,14 +11,14 @@ module CBin
11
11
  class Builder
12
12
  include Pod
13
13
 
14
- def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shells, framework_path)
14
+ def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shell, framework_path)
15
15
  @spec = spec
16
16
  @source_dir = source_dir
17
17
  @file_accessor = file_accessor
18
18
  @platform = platform
19
19
  @framework = framework_path
20
20
  @archs = archs
21
- @pre_build_shells = pre_build_shells
21
+ @pre_build_shell = pre_build_shell
22
22
  @source_files = "#{@source_dir}/#{library.name_path}"
23
23
  @source_zip_file = "#{@source_files}.zip"
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fy-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dr