Skip to content

Commit

Permalink
Fixed marklogic-community#493: allow multiple ml-configs
Browse files Browse the repository at this point in the history
  • Loading branch information
grtjn committed Jan 28, 2016
1 parent 483c76b commit 08443ac
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@ def ServerConfig.substitute_properties(sub_me, with_me, prefix = "")
needs_rescan = false
sub_me.each do |k,v|
if v.match(/\$\{basedir\}/)
sub_me[k] = ServerConfig.expand_path(v.sub("${basedir}", Dir.pwd))
sub_me[k] = ServerConfig.expand_path(v.gsub("${basedir}", Dir.pwd))
else
matches = v.scan(/\$\{([^}]+)\}/)
if matches.length > 0
Expand Down Expand Up @@ -2235,8 +2235,10 @@ def ssl_certificate_xml
}
end

def build_config(config_file)
config = File.read(config_file)
def build_config(config_files)
configs = []
config_files.split(",").each do |config_file|
config = File.read(config_file)

# Build the triggers db if it is provided
if @properties['ml.triggers-db'].present?
Expand Down Expand Up @@ -2376,7 +2378,10 @@ def build_config(config_file)
config.gsub!("{", "{{")
config.gsub!("}", "}}")

config
configs << config
end

%Q{(#{configs.join(", ")})}
end

def replace_properties(contents, name)
Expand Down

0 comments on commit 08443ac

Please sign in to comment.