pod-pipeline 0.5.2 → 0.5.4

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: db51e93a3eb0a400e90b2beb2153de9519b2b548ad7ddccde9af2486bba61742
4
- data.tar.gz: 5bf678bfd5829e5022b0e693f69443faa9bcab9b0a53b43a7b10e1579c05e0a2
3
+ metadata.gz: 5b8f7c79b8a9d1755b69b4ed1b77c8bb04fb8b5ed5d226bf78c233bcadc2fef6
4
+ data.tar.gz: 57a4838377e62a944aba6db97f3e374cc4b2f114cf50e7597ec66a1f659cd19d
5
5
  SHA512:
6
- metadata.gz: 0d36354903bf2238d446620712e97087cda0e13b4e7303c24e5abce46c3c67b381c530ae379633bd429abb531a44c23d58fd4e67074cbdbc8902d5d25a03f106
7
- data.tar.gz: edd7a6d04f81316e3bfddc8b9fcc91e32e5579def299609240300ce0ecb31cc6f790d21c602bf4de998e81a32137e3baf62683953007a16ec9bd3de9cfab8be2
6
+ metadata.gz: dd3d06a31f00c1ac04a45491ccafe307a44a6573ff027d528cdfdb8321e9e526ce1ff8de7a41dc5d7f500fb36894d83a9c3bd170d841c7fbfd4f1a2a44e5e6c0
7
+ data.tar.gz: a69e4f6fb4d232f96e437f22fb9fb40af5aba1eee113a1c1da60030f55dca2c8fa6f7d4ba925f8ae3a5b3b8a4be95505e6feb6f6d918c20b249fa20d546185b3
@@ -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
@@ -141,13 +143,13 @@ 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
 
148
150
  def copy_bundles(local_dependency, pod_dependency)
149
151
  #添加 构建生成的资源包
150
- inputs = ["#{@output}/**/#{@podspec.name}/*.bundle"]
152
+ inputs = ["#{@build_path}/**/#{@podspec.name}/*.bundle"]
151
153
  if local_dependency
152
154
  #添加 本地依赖的资源包
153
155
  inputs << "#{@output}/#{@podspec.name}/Libraries/**/*.bundle"
@@ -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.2
4
+ version: 0.5.4
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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core