pod-pipeline 0.5.7 → 0.5.9

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: 16980dad637c15796234c1cdb4e559152e1136397d6cf860d9cc9a3d1aaecca9
4
- data.tar.gz: 1340eb923bc0856d793cecf302e64bc34e2e3fb59dd254b0e93130bc309fa96c
3
+ metadata.gz: d25938cced26fc15ef81da41b55733b9c8043c1cf0ef21dbb7b220b63d93bbd5
4
+ data.tar.gz: 127e94bfdef35248fa9ce8f82e4699722c19d49d49a03e608031705f13fb296a
5
5
  SHA512:
6
- metadata.gz: 1955fd51720cb745dbfcd234dbd983ce0df51a0ebcad4366f8fd61ab8a792f8cf4b51f2ddde773252820378df4347011510d9282bc5917583d94902370649aee
7
- data.tar.gz: 16ac4680004b7ebab8e0067037d2c67df4d44fc6f0b5ba0c1d08d184a56cd781b2eac5c54d65a5f64c6bb1dcc5fae8ffacf7c720e6a0efc3bae887103dba6104
6
+ metadata.gz: e4c077e56bc88e8bcb6802a2da7693250c7b12a310dc63aeadc4e0433d85c850148a7a8714b15e54cacd8d356f607d7d902d78d6b781304ae200cfc02a73bb89
7
+ data.tar.gz: 4fff1e1982fe98d629edf8cd62cf1058315b71ea062c05258ec08276980eeb1fc0fbf8546845a75f6cc43eec7980b47a8ebc9fdebc412150e63110f272305cb8
@@ -70,9 +70,11 @@ module PPL
70
70
  XCodebuild.build(@workspace.path, @podspec.name, arch, @configuration, @build_path)
71
71
  end
72
72
 
73
- #合并头文件
74
- puts "\n[合并 #{@combines.join(", ")} 的头文件]"
75
- combine_headers(@combines.include?('local'), @combines.include?('pod'))
73
+ if @combine_headers
74
+ #合并头文件
75
+ puts "\n[合并 #{@combines.join(", ")} 的头文件]"
76
+ combine_headers(@combines.include?('local'), @combines.include?('pod'))
77
+ end
76
78
 
77
79
  #合并二进制文件
78
80
  puts "\n[合并 #{@combines.join(", ")} 的二进制文件]"
@@ -101,36 +103,35 @@ module PPL
101
103
  end
102
104
 
103
105
  def add_headers
104
- # header_stands = "#{@output}/Example/Pods/Headers/Public/#{@podspec.name}/*.h"
105
- # Dir[header_stands].each do |header_stand|
106
- # if File.ftype(header_stand).eql? 'link'
107
- # header_file = "#{File.dirname(header_stand)}/#{File.readlink(header_stand)}"
108
- # if File.ftype(header_file).eql? 'file'
109
- # header_file_basename = File.basename(header_file)
110
- # if !(File.exist? "#{@framework_headers_path}/#{header_file_basename}")
111
- # puts header_file_basename
112
- # FileUtils.cp(header_file, @framework_headers_path)
113
- # end
114
- # end
115
- # end
116
- # end
117
- # header_files = "#{@build_path}/**/#{@podspec.name}.framework/Headers/*.h"
118
- # Dir[header_files].each do |header_file|
119
- # if File.ftype(header_file).eql? 'file'
120
- # header_file_basename = File.basename(header_file)
121
- # if !(File.exist? "#{@framework_headers_path}/#{header_file_basename}")
122
- # puts header_file_basename
123
- # FileUtils.cp(header_file, @framework_headers_path)
124
- # end
125
- # end
126
- # end
106
+ header_stands = "#{@output}/Example/Pods/Headers/Public/#{@podspec.name}/*.h"
107
+ Dir[header_stands].each do |header_stand|
108
+ if File.ftype(header_stand).eql? 'link'
109
+ header_file = "#{File.dirname(header_stand)}/#{File.readlink(header_stand)}"
110
+ if File.ftype(header_file).eql? 'file'
111
+ header_file_basename = File.basename(header_file)
112
+ if !(File.exist? "#{@framework_headers_path}/#{header_file_basename}")
113
+ puts header_file_basename
114
+ FileUtils.cp(header_file, @framework_headers_path)
115
+ end
116
+ end
117
+ end
118
+ end
119
+ header_files = "#{@build_path}/**/#{@podspec.name}.framework/Headers/*.h"
120
+ Dir[header_files].each do |header_file|
121
+ if File.ftype(header_file).eql? 'file'
122
+ header_file_basename = File.basename(header_file)
123
+ if !(File.exist? "#{@framework_headers_path}/#{header_file_basename}")
124
+ puts header_file_basename
125
+ FileUtils.cp(header_file, @framework_headers_path)
126
+ end
127
+ end
128
+ end
127
129
  end
128
130
 
129
131
  def combine_headers(local_dependency, pod_dependency)
130
132
  headers = "#{@framework_path}/Headers"
131
133
  #添加 构建生成的二进制文件
132
134
  inputs = []
133
- inputs << "#{@build_path}/*/**/#{@podspec.name}.framework"
134
135
  if local_dependency
135
136
  #添加 本地依赖的二进制文件
136
137
  inputs << "#{@output}/#{@podspec.name}/Frameworks/**/*.framework"
@@ -143,6 +144,8 @@ module PPL
143
144
  end
144
145
 
145
146
  Header.combine(headers, inputs, @combine_include, @combine_exclude)
147
+
148
+ add_headers
146
149
  end
147
150
 
148
151
  def combine_binarys(local_dependency, pod_dependency)
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Depend < Scan
7
+ self.summary = '输出 Pod 配置信息'
8
+
9
+ self.description = <<-DESC
10
+ 输出 Pod 配置信息。
11
+ DESC
12
+
13
+ self.arguments = [
14
+ CLAide::Argument.new('项目根目录(默认使用当前目录)', false),
15
+ ]
16
+ def self.options
17
+ [].concat(super)
18
+ end
19
+
20
+ def initialize(argv)
21
+ @path = argv.arguments!
22
+
23
+ @projectPath = @path.count.zero? ? Pathname.pwd.to_s : @path.first
24
+
25
+ super
26
+ end
27
+
28
+ def run
29
+ PPL::Scanner.new(@projectPath, ['depend']).run
30
+
31
+ puts "#{PPL::Scanner.depend}" if PPL::Scanner.depend
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,5 +1,6 @@
1
1
  require 'pod-pipeline/command/scan/name'
2
2
  require 'pod-pipeline/command/scan/version'
3
+ require 'pod-pipeline/command/scan/depend'
3
4
  require 'pod-pipeline/command/scan/remote'
4
5
  require 'pod-pipeline/command/scan/branch'
5
6
  require 'pod-pipeline/command/scan/workspace'
@@ -45,6 +45,15 @@ module PPL
45
45
  input_queue
46
46
  end
47
47
 
48
+ def self.combine_reset(header, include_list)
49
+ content = File.read(header)
50
+ replace = PPL::Scanner.name
51
+ include_list.each do |include_name|
52
+ content = content.gsub(include_name, replace)
53
+ end
54
+ File.write(header, content)
55
+ end
56
+
48
57
  def self.combine(output, inputs, include_list = [], exclude_list = [])
49
58
  puts "\n目标文件:#{output}\n"
50
59
 
@@ -53,6 +62,9 @@ module PPL
53
62
  FileUtils.cp(header, output, 'preserve': true)
54
63
  end
55
64
  end
65
+ Dir["#{output}/*.h"].each do |header|
66
+ combine_reset(header, include_list)
67
+ end
56
68
  end
57
69
  end
58
70
  end
@@ -10,6 +10,7 @@ module PPL
10
10
  @@linter = nil
11
11
  @@name = nil
12
12
  @@version = nil
13
+ @@depend = nil
13
14
  @@git = nil
14
15
  @@remote = nil
15
16
  @@branch = nil
@@ -30,6 +31,7 @@ module PPL
30
31
  @@linter = scan_pod @projectPath
31
32
  @@name = @@linter.spec.name
32
33
  @@version = @@linter.spec.version
34
+ @@depend = @@linter.spec.dependencies
33
35
  @@git = scan_git @projectPath
34
36
  @@remote = @@git.remote
35
37
  @@branch = @@git.branches.current.first
@@ -40,6 +42,9 @@ module PPL
40
42
  when "version"
41
43
  @@linter = scan_pod @projectPath
42
44
  @@version = @@linter.spec.version
45
+ when "depend"
46
+ @@linter = scan_pod @projectPath
47
+ @@depend = @@linter.spec.dependencies.map{ |depend| depend.name }.join(',')
43
48
  when "remote"
44
49
  @@git = scan_git @projectPath
45
50
  @@remote = @@git.remote
@@ -68,6 +73,10 @@ module PPL
68
73
  @@version
69
74
  end
70
75
 
76
+ def self.depend
77
+ @@depend
78
+ end
79
+
71
80
  def self.git
72
81
  @@git
73
82
  end
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.7
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - 郑贤达
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-05 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -120,6 +120,7 @@ files:
120
120
  - lib/pod-pipeline/command/scan.rb
121
121
  - lib/pod-pipeline/command/scan/all.rb
122
122
  - lib/pod-pipeline/command/scan/branch.rb
123
+ - lib/pod-pipeline/command/scan/depend.rb
123
124
  - lib/pod-pipeline/command/scan/name.rb
124
125
  - lib/pod-pipeline/command/scan/remote.rb
125
126
  - lib/pod-pipeline/command/scan/version.rb