pod-pipeline 0.5.1 → 0.5.3

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: afc51e61275a6b58b4f0d10d67434a9ee455491487f5d6f48e12f35ec9b06781
4
- data.tar.gz: e68a6fea1c85b64f39f47ed83ab736623b4848f4a82ea02d059f94aeb52077e9
3
+ metadata.gz: fd5fd584f64a59dee8b4cd3689531c99fdf216de5303b00df371ea5a2199d81f
4
+ data.tar.gz: 90b7e415404252fc567d931b4e922109e5dbfe3c6882374a67ef89cd0f14246c
5
5
  SHA512:
6
- metadata.gz: 50249a61a5551cf610bbe1dedbea87b889b5731cdf2d1b080a2f3ef563436d27dcd17017829c217e291a3b24728e2a58f8a85e083b4f3dc313be33ef369d9620
7
- data.tar.gz: b043a21d4f502890c6a19e141b97945f423806cfd294949d5c3c41b4375c6e82b43b4de4a65c154d3bd9e09ab29a91a83d8a750b6356c145407f3dc64f4d85d2
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依赖库。(默认为 local)'],
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
@@ -123,8 +125,8 @@ module PPL
123
125
  binary = "#{@framework_path}/#{@podspec.name}"
124
126
  #添加 构建生成的二进制文件
125
127
  inputs = []
126
- inputs << "#{@build_path}/**/lib#{@podspec.name}.a"
127
- inputs << "#{@build_path}/**/*.framework/#{@podspec.name}"
128
+ inputs << "#{@build_path}/*/**/lib#{@podspec.name}.a"
129
+ inputs << "#{@build_path}/*/**/*.framework/#{@podspec.name}"
128
130
  if local_dependency
129
131
  #添加 本地依赖的二进制文件
130
132
  inputs << "#{@output}/#{@podspec.name}/Libraries/**/*.a"
@@ -132,8 +134,8 @@ module PPL
132
134
  end
133
135
  if pod_dependency
134
136
  #添加 Pod依赖库构建生成的二进制文件
135
- inputs << "#{@build_path}/**/lib*.a";
136
- inputs << "#{@build_path}/**/*.framework/*";
137
+ inputs << "#{@build_path}/*/**/lib*.a";
138
+ inputs << "#{@build_path}/*/**/*.framework/*";
137
139
  #添加 Pod依赖库预先构建的二进制文件
138
140
  inputs << "#{@output}/Example/Pods/**/*SDK/*.framework/*"
139
141
  #添加 Pod依赖库本地依赖的二进制文件
@@ -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
 
@@ -155,7 +157,7 @@ module PPL
155
157
  end
156
158
  if pod_dependency
157
159
  #添加 Pod依赖库构建生成的资源包
158
- inputs << "#{@build_path}/**/*.bundle"
160
+ inputs << "#{@build_path}/*/**/*.bundle"
159
161
  #添加 Pod依赖库预先构建的资源包
160
162
  inputs << "#{@output}/Example/Pods/**/*SDK/*.bundle"
161
163
  #添加 Pod依赖库本地依赖的资源包
@@ -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, ignore="")
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.1
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-10-27 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core