Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --config-files to the fpm builder command #85

Merged
merged 1 commit into from
Dec 6, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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