fixed a few issues with the rakefile, and updated the readme
This commit is contained in:
parent
58d342b5af
commit
cc8985df55
2 changed files with 45 additions and 11 deletions
18
Rakefile
18
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue