pod-pipeline 0.4.2 → 0.5.1

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: 5e064b08fce2d112de7f132815ddd4bb6aa8f46e77dd08e2668a55ed32457a44
4
- data.tar.gz: ba58fd7869e913eccc0bb462b61ed6506f7618ba83ba15c7a715c7ff422943ba
3
+ metadata.gz: afc51e61275a6b58b4f0d10d67434a9ee455491487f5d6f48e12f35ec9b06781
4
+ data.tar.gz: e68a6fea1c85b64f39f47ed83ab736623b4848f4a82ea02d059f94aeb52077e9
5
5
  SHA512:
6
- metadata.gz: cdd6848d40920cc67c19496eb506badf5a30dd1ae1ba4f70ad7a11cbb9640c5f8c42d7eaa974ccb23dfc89d71a607498f45bdccd2c2cb6b07770b9fcfba43e55
7
- data.tar.gz: c7755c0b4070ba5d3b5cbf49ed32b156a13e8b0616e0fbd651000877c6a2b88c0031ccb0602dc3b5a17523ff71499b50ac66b0d596e390e980766afcc6b10cf2
6
+ metadata.gz: 50249a61a5551cf610bbe1dedbea87b889b5731cdf2d1b080a2f3ef563436d27dcd17017829c217e291a3b24728e2a58f8a85e083b4f3dc313be33ef369d9620
7
+ data.tar.gz: b043a21d4f502890c6a19e141b97945f423806cfd294949d5c3c41b4375c6e82b43b4de4a65c154d3bd9e09ab29a91a83d8a750b6356c145407f3dc64f4d85d2
@@ -42,9 +42,9 @@ module PPL
42
42
  end
43
43
 
44
44
  def run
45
- PPL::Scanner.new(@projectPath, ["pod", "workspace"]).run
45
+ PPL::Scanner.new(@projectPath, ["all"]).run
46
46
 
47
- @podspec = PPL::Scanner.podspec
47
+ @podspec = PPL::Scanner.linter.spec
48
48
  @workspace = PPL::Scanner.workspace
49
49
  puts "Pod: #{@podspec}"
50
50
  puts "Workspace: #{@workspace.path}"
@@ -50,7 +50,7 @@ module PPL
50
50
  def run
51
51
  PPL::Command::Update.run([@projectPath] + argv_extension['update'])
52
52
 
53
- PPL::Scanner.new(@projectPath, ['pod']).run
53
+ PPL::Scanner.new(@projectPath, ['all']).run
54
54
 
55
55
  podspec_file = PPL::Scanner.linter.file
56
56
 
@@ -0,0 +1,39 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class All < 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, ["all"]).run
30
+
31
+ puts "Pod: name = #{PPL::Scanner.name}, version = #{PPL::Scanner.version}" if PPL::Scanner.linter
32
+ puts "Git: remote = #{PPL::Scanner.git.remote}, branch = #{PPL::Scanner.git.branches.current.first}" if PPL::Scanner.git
33
+ puts "Workspace: #{PPL::Scanner.workspace.path}" if PPL::Scanner.workspace
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Branch < Scan
7
+ self.summary = '输出 Pod Git信息'
8
+
9
+ self.description = <<-DESC
10
+ 输出 Pod Git信息。
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, ['branch']).run
30
+
31
+ puts "#{PPL::Scanner.branch}" if PPL::Scanner.branch
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Name < 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, ['name']).run
30
+
31
+ puts "#{PPL::Scanner.name}" if PPL::Scanner.name
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Remote < Scan
7
+ self.summary = '输出 Pod Git信息'
8
+
9
+ self.description = <<-DESC
10
+ 输出 Pod Git信息。
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, ['remote']).run
30
+
31
+ puts "#{PPL::Scanner.remote}" if PPL::Scanner.remote
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Version < 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, ['version']).run
30
+
31
+ puts "#{PPL::Scanner.version}" if PPL::Scanner.version
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ require 'pod-pipeline/util/scanner'
2
+
3
+ module PPL
4
+ class Command
5
+ class Scan < Command
6
+ class Workspace < 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, ['workspace']).run
30
+
31
+ puts "#{PPL::Scanner.workspace.path}" if PPL::Scanner.workspace
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,37 +1,23 @@
1
- require 'pod-pipeline/util/scanner'
1
+ require 'pod-pipeline/command/scan/name'
2
+ require 'pod-pipeline/command/scan/version'
3
+ require 'pod-pipeline/command/scan/remote'
4
+ require 'pod-pipeline/command/scan/branch'
5
+ require 'pod-pipeline/command/scan/workspace'
6
+ require 'pod-pipeline/command/scan/all'
2
7
 
3
8
  module PPL
4
9
  class Command
5
10
  class Scan < Command
11
+ self.abstract_command = true
12
+
6
13
  self.summary = '项目扫描'
7
14
  self.description = <<-DESC
8
15
  获取项目的关键参数
9
16
  DESC
10
- self.arguments = [
11
- CLAide::Argument.new('项目根目录(默认使用当前目录)', false),
12
- ]
13
- def self.options
14
- [
15
- ['--channel=pod,git,workspace', '扫描内容。(默认扫描所有内容)']
16
- ].concat(super)
17
- end
18
17
 
19
18
  def initialize(argv)
20
- @path = argv.arguments!
21
- @channels = argv.option('channel', '').split(',')
22
-
23
- @projectPath = @path.count.zero? ? Pathname.pwd.to_s : @path.first
24
-
25
19
  super
26
20
  end
27
-
28
- def run
29
- PPL::Scanner.new(@projectPath, @channels).run
30
-
31
- puts "Pod: #{PPL::Scanner.podspec}" if PPL::Scanner.podspec
32
- puts "Git: remote = #{PPL::Scanner.git.remote}, branch = #{PPL::Scanner.git.branches.current.first}" if PPL::Scanner.git
33
- puts "Workspace: #{PPL::Scanner.workspace.path}" if PPL::Scanner.workspace
34
- end
35
21
  end
36
22
  end
37
23
  end
@@ -42,7 +42,7 @@ module PPL
42
42
  end
43
43
 
44
44
  def run
45
- PPL::Scanner.new(@projectPath, ['pod', 'git']).run
45
+ PPL::Scanner.new(@projectPath, ['all']).run
46
46
 
47
47
  @channels = ["all"] if @channels.count.zero?
48
48
 
@@ -64,7 +64,7 @@ module PPL
64
64
  end
65
65
 
66
66
  def update_version
67
- version = PPL::Scanner.podspec.version
67
+ version = PPL::Scanner.linter.spec.version
68
68
  raise "版本号异常,无法更新" unless version
69
69
  if @new_version
70
70
  version.archiving(@new_version)
@@ -77,7 +77,7 @@ module PPL
77
77
 
78
78
  def update_git
79
79
  git = PPL::Scanner.git
80
- new_tag = PPL::Scanner.podspec.version.version
80
+ new_tag = PPL::Scanner.linter.spec.version.version
81
81
  git.tags.each do |tag|
82
82
  raise "当前版本 #{new_tag} 已发布,请尝试其他版本号" if tag.name.eql? new_tag
83
83
  end
@@ -8,8 +8,11 @@ require 'pod-pipeline/extension/workspace-ppl.rb'
8
8
  module PPL
9
9
  class Scanner
10
10
  @@linter = nil
11
- @@podspec = nil
11
+ @@name = nil
12
+ @@version = nil
12
13
  @@git = nil
14
+ @@remote = nil
15
+ @@branch = nil
13
16
  @@workspace = nil
14
17
 
15
18
  def initialize(projectPath, channels)
@@ -20,20 +23,29 @@ module PPL
20
23
  def run
21
24
  @channels = ["all"] if @channels.count.zero?
22
25
 
23
- puts "\n[扫描 #{@channels.join(", ")} 内容]"
24
-
25
26
  @channels.each do |channel|
26
27
  case channel
27
28
  when "all"
29
+ puts "\n[扫描 #{@projectPath.split("/").last} 内容]"
28
30
  @@linter = scan_pod @projectPath
29
- @@podspec = @@linter.spec
31
+ @@name = @@linter.spec.name
32
+ @@version = @@linter.spec.version
30
33
  @@git = scan_git @projectPath
34
+ @@remote = @@git.remote
35
+ @@branch = @@git.branches.current.first
31
36
  @@workspace = scan_workspace @projectPath
32
- when "pod"
37
+ when "name"
38
+ @@linter = scan_pod @projectPath
39
+ @@name = @@linter.spec.name
40
+ when "version"
33
41
  @@linter = scan_pod @projectPath
34
- @@podspec = @@linter.spec
35
- when "git"
42
+ @@version = @@linter.spec.version
43
+ when "remote"
44
+ @@git = scan_git @projectPath
45
+ @@remote = @@git.remote
46
+ when "branch"
36
47
  @@git = scan_git @projectPath
48
+ @@branch = @@git.branches.current.first
37
49
  when "workspace"
38
50
  @@workspace = scan_workspace @projectPath
39
51
  else
@@ -48,14 +60,26 @@ module PPL
48
60
  @@linter
49
61
  end
50
62
 
51
- def self.podspec
52
- @@podspec
63
+ def self.name
64
+ @@name
65
+ end
66
+
67
+ def self.version
68
+ @@version
53
69
  end
54
70
 
55
71
  def self.git
56
72
  @@git
57
73
  end
58
74
 
75
+ def self.remote
76
+ @@remote
77
+ end
78
+
79
+ def self.branch
80
+ @@branch
81
+ end
82
+
59
83
  def self.workspace
60
84
  @@workspace
61
85
  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.4.2
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 郑贤达
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-15 00:00:00.000000000 Z
11
+ date: 2022-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core
@@ -118,6 +118,12 @@ files:
118
118
  - lib/pod-pipeline/command/new.rb
119
119
  - lib/pod-pipeline/command/publish.rb
120
120
  - lib/pod-pipeline/command/scan.rb
121
+ - lib/pod-pipeline/command/scan/all.rb
122
+ - lib/pod-pipeline/command/scan/branch.rb
123
+ - lib/pod-pipeline/command/scan/name.rb
124
+ - lib/pod-pipeline/command/scan/remote.rb
125
+ - lib/pod-pipeline/command/scan/version.rb
126
+ - lib/pod-pipeline/command/scan/workspace.rb
121
127
  - lib/pod-pipeline/command/update.rb
122
128
  - lib/pod-pipeline/extension/dir-ppl.rb
123
129
  - lib/pod-pipeline/extension/git-ppl.rb