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 +4 -4
- data/lib/cocoapods-fy-bin/command/bin/archive.rb +3 -3
- data/lib/cocoapods-fy-bin/command/bin/auto.rb +4 -4
- data/lib/cocoapods-fy-bin/gem_version.rb +1 -1
- data/lib/cocoapods-fy-bin/helpers/build_helper.rb +4 -4
- data/lib/cocoapods-fy-bin/helpers/framework_builder.rb +7 -8
- data/lib/cocoapods-fy-bin/helpers/library_builder.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ca77f7e13d94ec0a6aad54d5455bc9b2123451d22fd1b4f1aad4a5a9df0901
|
4
|
+
data.tar.gz: b849bbb48f53940fadac933adae49c6b2e69fca3b0c2b3305c2202dc6505dd30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
['--
|
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
|
-
@
|
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
|
-
@
|
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
|
-
['--
|
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
|
-
@
|
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 @
|
132
|
-
argvs += ["--
|
131
|
+
if @pre_build_shell
|
132
|
+
argvs += ["--pre_build_shell=#{@pre_build_shell}"]
|
133
133
|
end
|
134
134
|
argvs += ["--configuration=#{@config}"]
|
135
135
|
|
@@ -20,7 +20,7 @@ module CBin
|
|
20
20
|
zip,
|
21
21
|
rootSpec,
|
22
22
|
archs,
|
23
|
-
|
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
|
-
@
|
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, @
|
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, @
|
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,
|
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
|
-
@
|
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
|
-
|
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
|
-
|
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
|
207
|
-
|
208
|
-
|
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,
|
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
|
-
@
|
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
|