aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorB Mathis <brandon@imathis.com>2009-10-20 08:50:16 -0500
committerB Mathis <brandon@imathis.com>2009-10-20 08:50:16 -0500
commite0a0d093c44481d1fada3ab4bb9a0c5cf1276524 (patch)
tree95f73f688f0065a212c04cc9e180957a420fa22e /Rakefile
parenta72b96142a3a9c55ef661863484a26bc02103169 (diff)
downloadmy_new_personal_website-e0a0d093c44481d1fada3ab4bb9a0c5cf1276524.tar.xz
my_new_personal_website-e0a0d093c44481d1fada3ab4bb9a0c5cf1276524.zip
paramaterized feed, rsync deployment, and unified layouts
Diffstat (limited to '')
-rw-r--r--Rakefile16
1 files changed, 12 insertions, 4 deletions
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"