pod-pipeline 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pod-pipeline/command/build.rb +5 -3
- data/lib/pod-pipeline/util/binary.rb +13 -6
- data/lib/pod-pipeline/util/bundle.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd5fd584f64a59dee8b4cd3689531c99fdf216de5303b00df371ea5a2199d81f
|
4
|
+
data.tar.gz: 90b7e415404252fc567d931b4e922109e5dbfe3c6882374a67ef89cd0f14246c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25d687633b6682b57b6fa3873405f551fe628fddea3f802e5f52c898d9f854907a189c10cec9cbce03a5e1f222ac9a51ba40ac5816c9d5d6871e9ce8d1681b99
|
7
|
+
data.tar.gz: 6b7c5325085f307cdbd6692186a7a083eef5bab5890d81fd2780816fb999a83c37702aecda49e53a5ff21866e9c2a85684bc990ef3b620d7c067c0776876c10d
|
@@ -22,7 +22,8 @@ module PPL
|
|
22
22
|
['--output=./', '项目构建的输出目录。(默认使用项目根目录)'],
|
23
23
|
['--configuration=Release', '项目构建的环境。(默认为Release)'],
|
24
24
|
['--arch=arm64,armv7,x86_64', '项目构建的架构。(默认为 arm64,armv7,x86_64)'],
|
25
|
-
['--combine=local,pod', '项目构建后合并依赖库的二进制文件,local为本地依赖库,pod为CocoaPods依赖库。(默认为
|
25
|
+
['--combine=local,pod', '项目构建后合并依赖库的二进制文件,local为本地依赖库,pod为CocoaPods依赖库。(默认为 不合并)'],
|
26
|
+
['--combine-ignore=name1,name2', '项目构建后合并依赖库的二进制文件,标注不想合并的内容。'],
|
26
27
|
['--bundle-merge=merge', '是否合并所有资源包,参数为合并后的资源包名。(默认为 不合并)'],
|
27
28
|
].concat(super)
|
28
29
|
end
|
@@ -33,6 +34,7 @@ module PPL
|
|
33
34
|
@configuration = argv.option('configuration', '').split(',').first
|
34
35
|
@archs = argv.option('arch', '').split(',')
|
35
36
|
@combines = argv.option('combine', '').split(',')
|
37
|
+
@combine_ignore = argv.option('combine-ignore', '').split(',')
|
36
38
|
@bundle_merge = argv.option('bundle-merge', '').split(',').first
|
37
39
|
|
38
40
|
@projectPath = @path.count.zero? ? Pathname.pwd.to_s : @path.first
|
@@ -141,7 +143,7 @@ module PPL
|
|
141
143
|
inputs << "#{@output}/Example/Pods/**/Frameworks/**/*.framework/*"
|
142
144
|
end
|
143
145
|
|
144
|
-
Binary.combine(binary, inputs)
|
146
|
+
Binary.combine(binary, inputs, @combine_ignore)
|
145
147
|
Binary.thin(binary, @archs)
|
146
148
|
end
|
147
149
|
|
@@ -163,7 +165,7 @@ module PPL
|
|
163
165
|
inputs << "#{@output}/Example/Pods/**/Frameworks/**/*.bundle"
|
164
166
|
end
|
165
167
|
|
166
|
-
Bundle.cp(inputs, @build_path)
|
168
|
+
Bundle.cp(inputs, @build_path, @combine_ignore)
|
167
169
|
end
|
168
170
|
|
169
171
|
def merge_bundles
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module PPL
|
2
2
|
class Binary
|
3
|
-
def self.combine(output, inputs,
|
3
|
+
def self.combine(output, inputs, ignore_list=[])
|
4
4
|
puts "\n目标文件:#{output}\n"
|
5
5
|
|
6
6
|
#获取合并文件的路径序列
|
@@ -8,17 +8,24 @@ module PPL
|
|
8
8
|
inputs.each do |input|
|
9
9
|
puts "\n合并路径:#{input}"
|
10
10
|
|
11
|
-
Dir[input].each do |input_file
|
11
|
+
Dir[input].each do |input_file|
|
12
12
|
#若 input_file 为目录 则跳过
|
13
13
|
next if Dir.exists? input_file
|
14
|
-
#若 input_file 为被忽略标记的文件 则跳过
|
15
|
-
unless ignore.empty?
|
16
|
-
next if File.basename(input_file).include? File.basename(ignore)
|
17
|
-
end
|
18
14
|
#若 input_file 为非二进制文件 则跳过
|
19
15
|
info_log = `lipo -info "#{input_file}" > /dev/null 2>&1
|
20
16
|
echo result:$?`
|
21
17
|
next unless info_log.include? 'result:0'
|
18
|
+
#若 input_file 为被忽略标记的文件 则跳过
|
19
|
+
is_ignore = false
|
20
|
+
ignore_list.each { |ignore|
|
21
|
+
input_file_basename = File.basename(input_file)
|
22
|
+
ignore_basename = File.basename(ignore)
|
23
|
+
if input_file_basename == ignore_basename || input_file_basename == "lib#{ignore_basename}.a"
|
24
|
+
is_ignore = true
|
25
|
+
break
|
26
|
+
end
|
27
|
+
}
|
28
|
+
next if is_ignore
|
22
29
|
#若 input_file 为序列中已存在的文件 则跳过
|
23
30
|
next if input_file_queue.include? input_file
|
24
31
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module PPL
|
2
2
|
class Bundle
|
3
|
-
def self.cp(inputs, output)
|
3
|
+
def self.cp(inputs, output, ignore_list=[])
|
4
4
|
puts "\n目标文件:#{output}\n"
|
5
5
|
|
6
6
|
#获取合并文件的路径序列
|
@@ -10,7 +10,17 @@ module PPL
|
|
10
10
|
Dir[input].each do |input_bundle|;
|
11
11
|
#若 input_bundle 为输出目录 则跳过
|
12
12
|
next if input_bundle.eql? output
|
13
|
-
|
13
|
+
#若 input_bundle 为被忽略标记的文件 则跳过
|
14
|
+
is_ignore = false
|
15
|
+
ignore_list.each { |ignore|
|
16
|
+
input_file_basename = File.basename(input_bundle)
|
17
|
+
ignore_basename = File.basename(ignore)
|
18
|
+
if input_file_basename == "#{ignore_basename}.bundle"
|
19
|
+
is_ignore = true
|
20
|
+
break
|
21
|
+
end
|
22
|
+
}
|
23
|
+
next if is_ignore
|
14
24
|
#合并
|
15
25
|
puts "合并资源包:" + input_bundle
|
16
26
|
FileUtils.cp_r(input_bundle, output, :preserve => true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pod-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 郑贤达
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods-core
|