From cc8985df55983b7701acb04e62a24fc4d3c559d7 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Sat, 31 Oct 2009 23:17:29 -0500 Subject: fixed a few issues with the rakefile, and updated the readme --- Rakefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 31076377..08b29185 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- cgit v1.2.1