Class: Pod::Command::Binary::Lint
Constant Summary
FIRE_FLAG
Class Method Summary
collapse
Instance Method Summary
collapse
#fire_sources, #first_podspec
Constructor Details
#initialize(argv) ⇒ Lint
Returns a new instance of Lint.
21
22
23
24
25
26
27
28
29
|
# File 'lib/cocoapods-tdfire-binary/command/lint.rb', line 21
def initialize(argv)
@clean = argv.flag?('clean')
@sources = argv.option('sources')
@one_binary = argv.flag?('one-binary')
@spec_file = first_podspec
@spec_name = @spec_file.split('/').last.split('.').first unless @spec_file.nil?
unzip_framework
super
end
|
Class Method Details
.options ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/cocoapods-tdfire-binary/command/lint.rb', line 13
def self.options
[
['--sources', '私有源地址'],
['--clean', '执行成功后,删除 zip 文件外的所有生成文件'],
['--one-binary', '只让 Lint 的 Pod 进行二进制依赖,其余都用源码'],
].concat(super)
end
|
Instance Method Details
#unzip_framework ⇒ Object
38
39
40
41
42
43
44
|
# File 'lib/cocoapods-tdfire-binary/command/lint.rb', line 38
def unzip_framework
framework = "#{@spec_name}.framework"
zip_name = "#{framework}.zip"
if File.exist?(zip_name) && !File.exist?("#{@spec_name}.framework")
system "unzip #{zip_name}"
end
end
|
#validate! ⇒ Object
31
32
33
34
35
36
|
# File 'lib/cocoapods-tdfire-binary/command/lint.rb', line 31
def validate!
super
help! '当前目录下没有podspec文件.' if @spec_file.nil?
framework = "#{@spec_name}.framework"
help! "当前目录下没有#{framework}文件" unless File.exist?(framework)
end
|