24
25
26
27
28
29
30
31
32
33
|
# File 'lib/gpm/cli.rb', line 24
def package(file_or_directory)
raise "Only #{self.class.supported_sources.join(", ")} sources at the moment" unless self.class.supported_sources.include? options.source
raise "Only deb target at the moment" unless self.class.supported_targets.include? options.target
package_options = {}
{:workdir => :work_dir , :destination => :destination, :owner => :owner, :group => :group, :buildnumber => :build_number, INCLUDE_FILES_PARAM => :include_files}.each do |in_field, out_field|
package_options[out_field] = options[in_field] if options[in_field]
end
PackagingTask.create(file_or_directory, options.source, options.target, package_options).run
end
|