Skip to content

Commit

Permalink
Changed exclusion to use comma-seperated list of exclusions in config…
Browse files Browse the repository at this point in the history
…/testjour.yml
  • Loading branch information
Ethan Waldo committed Apr 1, 2010
1 parent b9490b9 commit e0f915e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/testjour/rsync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,19 @@ def successful?
end

def command
"rsync -az -e \"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\" --delete --exclude=.git --exclude=*.log --exclude=*.pid --exclude=*.msi #{@source_uri}/ #{destination_dir}"
excludes = ""
if File.exists?(file = "config/testjour.yml")
config = YAML.load_file(file).symbolize_keys
excludes = config[:exclude].split(",").map { |exclude|
" --exclude=#{exclude}"
}.join(" ") unless config[:exclude].blank?
end
"rsync -az -e \"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\" --delete#{excludes} --exclude=.git --exclude=*.log --exclude=*.pid #{@source_uri}/ #{destination_dir}"
end

def destination_dir
File.expand_path(".")
end

end
end
end

0 comments on commit e0f915e

Please sign in to comment.