24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/pod-pipeline/util/scanner.rb', line 24
def run
@channels = ["all"] if @channels.count.zero?
@channels.each do |channel|
case channel
when "all"
puts "\n[扫描 #{@projectPath.split("/").last} 内容]"
@@linter = scan_pod @projectPath
@@name = @@linter.spec.name
@@version = @@linter.spec.version
@@depend = @@linter.spec.dependencies
@@git = scan_git @projectPath
@@remote = @@git.remote
@@branch = @@git.branches.current.first
@@workspace = scan_workspace @projectPath
when "name"
@@linter = scan_pod @projectPath
@@name = @@linter.spec.name
when "version"
@@linter = scan_pod @projectPath
@@version = @@linter.spec.version
when "depend"
@@linter = scan_pod @projectPath
@@depend = @@linter.spec.dependencies.map{ |depend| depend.name }.join(',')
when "remote"
@@git = scan_git @projectPath
@@remote = @@git.remote
when "branch"
@@git = scan_git @projectPath
@@branch = @@git.branches.current.first
when "workspace"
@@workspace = scan_workspace @projectPath
else
raise "暂不支持#{channel}内容扫描"
end
end
end
|