Class: Package
- Inherits:
-
Object
- Object
- Package
- Defined in:
- lib/cocoapods-packageall/command/package.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(argv) ⇒ Package
Returns a new instance of Package.
4 5 6 |
# File 'lib/cocoapods-packageall/command/package.rb', line 4 def initialize(argv) p argv end |
Class Method Details
.create_fwk_dir(force) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cocoapods-packageall/command/package.rb', line 21 def self.create_fwk_dir(force) fwk_dir = (Dir.getwd + '/' + Frameworkrepo) puts "current work dir : #{fwk_dir}" if Dir.exist? (fwk_dir) if force == true `rm -rf #{fwk_dir}` Dir.mkdir(fwk_dir,0777) end else Dir.mkdir(fwk_dir,0777) end Dir.chdir(fwk_dir) fwk_dir end |
.package(specification, spec_source) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cocoapods-packageall/command/package.rb', line 7 def self.package(specification,spec_source) @@fwk_dir ||= create_fwk_dir(false) Dir.chdir(@@fwk_dir) command = "pod packagethk #{specification.defined_in_file} --exclude-deps --no-mangle --configuration=Debug --spec-sources=#{spec_source.join(',')}" puts "start package ..." puts command output = Time.now.to_s output << "\n" output += `#{command}` File.open("#{specification.name}_log.txt", 'w') { |file| file.write(output) } end |