Add site namespace and rename site preview/publish rake tasks.

This commit is contained in:
Tom Preston-Werner 2012-12-28 16:09:42 -06:00
parent 6c02483255
commit 88bdb15338
1 changed files with 36 additions and 34 deletions

View File

@ -115,8 +115,9 @@ end
# #
############################################################################# #############################################################################
namespace :site do
desc "Generate and view the site locally" desc "Generate and view the site locally"
task :site do task :preview do
# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and # Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
# then open it in a browser. Someday we can do better than this, I hope. # then open it in a browser. Someday we can do better than this, I hope.
Thread.new do Thread.new do
@ -131,7 +132,7 @@ task :site do
end end
desc "Commit the local site to the gh-pages branch and deploy" desc "Commit the local site to the gh-pages branch and deploy"
task :site_release do task :publish do
# Ensure the gh-pages dir exists so we can generate into it. # Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..." puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages") unless File.exist?("./gh-pages")
@ -154,6 +155,7 @@ task :site_release do
sh "cd gh-pages && git add . && git commit -m 'Updating to #{sha}.' && git push" sh "cd gh-pages && git add . && git commit -m 'Updating to #{sha}.' && git push"
puts 'Done.' puts 'Done.'
end end
end
############################################################################# #############################################################################
# #