fixed a few issues with the rakefile, and updated the readme

This commit is contained in:
B Mathis 2009-10-31 23:17:29 -05:00
parent 58d342b5af
commit cc8985df55
2 changed files with 45 additions and 11 deletions

View file

@ -1,14 +1,15 @@
require 'active_support'
## -- CHANGE FOR YOUR PROJECT -- ##
site_url = "http://yoursite.com" # deployed site url
ssh_user = "user@host.com" # for rsync deployment
document_root = "~/document_root/" # for rsync deployment
## ---- ##
port = "4000" # preview project port eg. http://localhost:4000
site = "site" # compiled site directory
source = "source" # source file directory
# MUST CHANGE FOR YOUR PROJECT
site_url = "http://yoursite.com" # deployed site url
ssh_user = "user@host.com" # for rsync deployment
document_root = "~/document_root/" # for rsync deployment
def ok_failed(condition)
if (condition)
puts "OK"
@ -29,6 +30,11 @@ task :clean do
Dir["#{site}/*"].each { |f| rm_rf(f) }
end
task :clean_debug do
puts "Removing debug pages..."
Dir["#{site}/debug"].each { |f| rm_rf(f) }
end
desc "generate website in output directory"
task :generate => :clean do
puts "Generating website..."
@ -56,7 +62,7 @@ task :watch do
end
desc "generate and deploy website"
task :deploy => :generate do
multitask :deploy => [:generate, :clean_debug] do
print "Deploying website..."
ok_failed system("rsync -avz --delete #{site}/ #{ssh_user}:#{document_root}")
end