Class: Pod::Command::Bin::Archive
- Inherits:
-
Pod::Command::Bin
- Object
- Pod::Command
- Pod::Command::Bin
- Pod::Command::Bin::Archive
- Defined in:
- lib/cocoapods-bin/command/bin/archive.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Archive
constructor
A new instance of Archive.
- #run ⇒ Object
Methods inherited from Pod::Command::Bin
Methods included from CBin::SpecFilesHelper
#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files
Methods included from CBin::SourcesHelper
#binary_source, #code_source, #sources_manager, #sources_option, #valid_sources
Constructor Details
#initialize(argv) ⇒ Archive
Returns a new instance of Archive.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/cocoapods-bin/command/bin/archive.rb', line 31 def initialize(argv) @code_dependencies = argv.flag?('code-dependencies') @allow_prerelease = argv.flag?('allow-prerelease') @clean = argv.flag?('clean', true) @zip = argv.flag?('zip', true) @sources = argv.option('sources') || [] @platform = Platform.new(:ios) super @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/cocoapods-bin/command/bin/archive.rb', line 18 def self. [ ['--code-dependencies', '使用源码依赖'], ['--allow-prerelease', '允许使用 prerelease 的版本'], ['--no-clean', '保留构建中间产物'], ['--no-zip', '不压缩静态 framework 为 zip'] ].concat(Pod::Command::Gen.).concat(super).uniq end |
Instance Method Details
#run ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/cocoapods-bin/command/bin/archive.rb', line 43 def run @spec = Specification.from_file(spec_file) generate_project build_static_framework zip_static_framework if @zip clean_workspace if @clean end |