cocoapods-fy-bin 0.0.9 → 0.1.2

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: 349f56acd81d29471129eed2a459165a89fbd3b8558b118f9b531441bae5d8cc
4
- data.tar.gz: 21b8eca394a490c8df72db1aed106272ad877065e18b6420da0a75e75edfc930
3
+ metadata.gz: 27ca77f7e13d94ec0a6aad54d5455bc9b2123451d22fd1b4f1aad4a5a9df0901
4
+ data.tar.gz: b849bbb48f53940fadac933adae49c6b2e69fca3b0c2b3305c2202dc6505dd30
5
5
  SHA512:
6
- metadata.gz: 238a5aca517a885d3d08ac700c8af22607511e1c3dc7beb4d1f199b3afdaadec6e57d0974463f14db8f4e22ce88a6d3028179102ccbb77b8a6d68ceff4e992b2
7
- data.tar.gz: ce69f0aa064cbac03c582852b1b667b69838d8042eb15a5b6fe3e4c3a06afb7165dfdc576853352086ace3ef29f5a4d62224336565440bee826004f5ee8b14c5
6
+ metadata.gz: b0025dcd7e6064523a2d7446c6da8bb990913769addab3d13d2f5d60f7a776858af9338effdb6568daa91a370b46fc556df0cbee6471d94173ee63f4a1ecce61
7
+ data.tar.gz: 1f4df164c4a91f40fba2d4d28f6e7edca6807828a156bc4225594a98ce4b501d6f67df2de5d37e0e7141e8f7fdd52ed42620a05acaec2a7a0a3215067e993d1a
@@ -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.0.9'
3
+ VERSION = '0.1.2'
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,10 +203,9 @@ module CBin
203
203
  end
204
204
 
205
205
  # 编译前需执行的的shell脚本
206
- def pre_build_shell
207
- command_args = @pre_build_commands.split(",")
208
- command_args.each do |command_arg|
209
- command = "sh #{command_arg}"
206
+ def pre_build_command
207
+ unless @pre_build_shell.empty? then
208
+ command = "sh #{@pre_build_shell}"
210
209
  puts command
211
210
  UI.message "command = #{command}"
212
211
  output = `#{command}`.lines.to_a
@@ -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.0.9
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dr