Skip to content

Commit

Permalink
Fixed an issue with pushing the instance config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Feb 13, 2012
1 parent b4bea3b commit 719a92c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rubber/instance.rb
Expand Up @@ -7,7 +7,7 @@ module Configuration
# Contains the ec2 instance configuration defined in instance.yml
#
class Instance
attr_reader :file, :artifacts
attr_reader :instance_storage, :artifacts
include Enumerable
include MonitorMixin

Expand Down
9 changes: 8 additions & 1 deletion lib/rubber/recipes/rubber/deploy.rb
Expand Up @@ -70,7 +70,14 @@ def run_config(options={})
# Need to do this so we can work with staging instances without having to
# checkin instance file between create and bootstrap, as well as during a deploy
if fetch(:push_instance_config, false)
push_files = [rubber_instances.file] + rubber_cfg.environment.config_files
push_files = rubber_cfg.environment.config_files

# If we're using a local instance file, push that up. This isn't necessary when storing in S3 or SimpleDB.
if rubber_instances.instance_storage =~ /^file:(.*)/
location = $1
push_files << location
end

push_files.each do |file|
dest_file = file.sub(/^#{Rubber.root}\/?/, '')
put(File.read(file), File.join(path, dest_file), :mode => "+r")
Expand Down

0 comments on commit 719a92c

Please sign in to comment.