mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2025-02-28 16:31:44 -05:00
Eliminating ternary op.
This commit is contained in:
parent
d6b6b0d80e
commit
c20c2a7acd
6
Rakefile
6
Rakefile
@ -298,7 +298,11 @@ task :rsync do
|
|||||||
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
|
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
|
||||||
end
|
end
|
||||||
puts "## Deploying website via Rsync"
|
puts "## Deploying website via Rsync"
|
||||||
ssh_key = (!configuration[:ssh_key].nil? && !configuration[:ssh_key].empty?) ? "-i #{ENV['HOME']}/.ssh/#{configuration[:ssh_key]}" : ""
|
ssh_key = if(!configuration[:ssh_key].nil? && !configuration[:ssh_key].empty?)
|
||||||
|
"-i #{ENV['HOME']}/.ssh/#{configuration[:ssh_key]}"
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end
|
||||||
document_root = ensure_trailing_slash(configuration[:document_root])
|
document_root = ensure_trailing_slash(configuration[:document_root])
|
||||||
ok_failed system("rsync -avze 'ssh -p #{configuration[:ssh_port]} #{ssh_key}' #{exclude} #{configuration[:rsync_args]} #{"--delete" unless !configuration[:rsync_delete]} #{ensure_trailing_slash(configuration[:destination])} #{configuration[:ssh_user]}:#{document_root}")
|
ok_failed system("rsync -avze 'ssh -p #{configuration[:ssh_port]} #{ssh_key}' #{exclude} #{configuration[:rsync_args]} #{"--delete" unless !configuration[:rsync_delete]} #{ensure_trailing_slash(configuration[:destination])} #{configuration[:ssh_user]}:#{document_root}")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user