diff options
author | B Mathis <brandon@imathis.com> | 2009-10-31 23:17:29 -0500 |
---|---|---|
committer | B Mathis <brandon@imathis.com> | 2009-10-31 23:17:29 -0500 |
commit | cc8985df55983b7701acb04e62a24fc4d3c559d7 (patch) | |
tree | 2e5fbc19458bea14181e0c1b6eeb20f62d4e35fd /Rakefile | |
parent | 58d342b5afafda3e6b114c9b81754ac6e3a3dd18 (diff) | |
download | my_new_personal_website-cc8985df55983b7701acb04e62a24fc4d3c559d7.tar.xz my_new_personal_website-cc8985df55983b7701acb04e62a24fc4d3c559d7.zip |
fixed a few issues with the rakefile, and updated the readme
Diffstat (limited to '')
-rw-r--r-- | Rakefile | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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 |