aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-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"