lib/dockly/deb.rb in dockly-1.8.0 vs lib/dockly/deb.rb in dockly-1.9.0
- old
+ new
@@ -8,11 +8,11 @@
dsl_attribute :package_name, :version, :release, :arch, :build_dir,
:deb_build_dir, :pre_install, :post_install, :pre_uninstall,
:post_uninstall, :s3_bucket, :files, :app_user, :vendor
dsl_class_attribute :docker, Dockly::Docker
- dsl_class_attribute :foreman, Dockly::Foreman
+ dsl_class_attribute :foreman, Dockly::Foreman, type: Array
default_value :version, '0.0'
default_value :release, '0'
default_value :arch, 'x86_64'
default_value :build_dir, 'build'
@@ -125,17 +125,17 @@
debug "converting to deb"
@deb_package = @dir_package.convert(FPM::Package::Deb)
end
def add_foreman(package)
- return if foreman.nil?
- info "adding foreman export"
- foreman.create!
- package.attributes[:prefix] = foreman.init_dir
- Dir.chdir(foreman.build_dir) do
- package.input('.')
+ return if (foreman || []).empty?
+ foreman.each do |fore|
+ info "adding foreman export '#{fore.name}'"
+ fore.create!
+ package.attributes[:prefix] = fore.init_dir
+ Dir.chdir(fore.build_dir) { package.input('.') }
+ package.attributes[:prefix] = nil
end
- package.attributes[:prefix] = nil
end
def add_files(package)
return if files.empty?
info "adding files to package"