From e0a0d093c44481d1fada3ab4bb9a0c5cf1276524 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Tue, 20 Oct 2009 08:50:16 -0500 Subject: paramaterized feed, rsync deployment, and unified layouts --- Rakefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index d36a84d9..04881b33 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,16 @@ require 'active_support' +# preview project on this port - http://localhost:4000 +port = "4000" + +# compiled site directory +site = "site" + +# for rsync deployment +ssh_user = "user@host.com" +document_root = "~/document_root/" + + def ok_failed(condition) if (condition) puts "OK" @@ -8,9 +19,6 @@ def ok_failed(condition) end end -port = "4000" -site = "site" - desc "list tasks" task :default do puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:default]]).to_sentence}" @@ -35,7 +43,7 @@ end desc "generate and deploy website" task :deploy => :generate do print "Deploying website..." - ok_failed system("rsync -avz --delete #{site}/ user@host.com:~/document_root/") + ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}") end desc "start up an instance of serve on the output files" -- cgit v1.2.1