Class: Pod::Command::Binary::Package

Inherits:
Pod::Command::Binary show all
Defined in:
lib/cocoapods-tdfire-binary/command/package.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#binary_config, #first_podspec, #private_sources

Constructor Details

#initialize(argv) ⇒ Package

Returns a new instance of Package.



29
30
31
32
33
34
35
36
37
38
# File 'lib/cocoapods-tdfire-binary/command/package.rb', line 29

def initialize(argv)
	@clean = argv.flag?('clean')
   @local = argv.flag?('local')
   @use_carthage = argv.flag?('use-carthage')
	@spec_sources = argv.option('spec-sources')
					@subspecs= argv.option('subspecs')
	@spec_file = first_podspec
	@binary_first = argv.flag?('binary-first')
	super
end

Class Method Details

.optionsObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/cocoapods-tdfire-binary/command/package.rb', line 18

def self.options
  [
    ['--clean', '执行成功后,删除 zip 文件外的所有生成文件'],
    ['--spec-sources', '私有源地址'],
    # ['--local', '使用本地代码'],
    ['--use-carthage', 'carthage使用carthage进行打包,三方库提供carthage的优先'],
						['--subspecs', '打包子组件'],
						['--binary-first', '二进制优先']
  ].concat(super)
end

Instance Method Details

#runObject



45
46
47
48
49
50
51
# File 'lib/cocoapods-tdfire-binary/command/package.rb', line 45

def run
					if @use_carthage
						build_by_carthage
					else
						build_by_pod_packager
					end
end

#validate!Object



40
41
42
43
# File 'lib/cocoapods-tdfire-binary/command/package.rb', line 40

def validate!
  super
  help! '当前目录下没有podspec文件.' if @spec_file.nil?
end