Class: Pkgr::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/pkgr/cli.rb

Instance Method Summary collapse

Instance Method Details

#package(tarball) ⇒ Object



96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/pkgr/cli.rb', line 96

def package(tarball)
  Pkgr.level = Logger::INFO if options[:verbose]
  Pkgr.level = Logger::DEBUG if options[:debug]

  Pkgr::Buildpack.buildpacks_cache_dir = options[:buildpacks_cache_dir] if options[:buildpacks_cache_dir]

  packager = Dispatcher.new(tarball, options)
  packager.call
rescue Pkgr::Errors::Base => e
  Pkgr.error "#{e.class.name} : #{e.message}"
  puts "* ERROR: #{e.message}"
  exit 1
end