Skip to content

Commit

Permalink
Merge pull request #85 from Contegix/fpm_config_files
Browse files Browse the repository at this point in the history
add --config-files to the fpm builder command
  • Loading branch information
schisamo committed Dec 6, 2013
2 parents f8f7319 + 1e75fbf commit 35162ee
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/omnibus/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def initialize(io, filename)

@exclusions = Array.new
@conflicts = Array.new
@config_files = Array.new
@dependencies = Array.new
@runtime_dependencies = Array.new
instance_eval(io)
Expand Down Expand Up @@ -314,6 +315,14 @@ def exclude(pattern)
@exclusions << pattern
end

# Add a config file.
#
# @param val [String] the name of a config file of your software
# @return [void]
def config_file(val)
@config_files << val
end

# Returns the platform version of the machine on which Omnibus is
# running, as determined by Ohai.
#
Expand Down Expand Up @@ -573,6 +582,10 @@ def fpm_command(pkg_type)
@exclusions.each do |pattern|
command_and_opts << "--exclude '#{pattern}'"
end

@config_files.each do |config_file|
command_and_opts << "--config-files '#{config_file}'"
end

@runtime_dependencies.each do |runtime_dep|
command_and_opts << "--depends '#{runtime_dep}'"
Expand Down

0 comments on commit 35162ee

Please sign in to comment.