fixed a bug in init_deploy task

This commit is contained in:
Brandon Mathis 2011-06-27 18:17:15 -04:00
parent 62c9780c67
commit 6f4c842bdf

View File

@ -117,12 +117,13 @@ end
desc "setup _deploy folder and deploy branch" desc "setup _deploy folder and deploy branch"
task :init_deploy, :branch do |t, args| task :init_deploy, :branch do |t, args|
puts "Please provide a deploy branch, eg. rake init_deploy[gh-pages]" unless args.branch puts "Please provide a deploy branch, eg. rake init_deploy[gh-pages]" unless args.branch
cd "#{_deploy}" do cd "#{deploy_dir}" do
system "git symbolic-ref HEAD refs/heads/#{args.branch}" system "git symbolic-ref HEAD refs/heads/#{args.branch}"
system "rm .git/index" system "rm .git/index"
system "git clean -fdx" system "git clean -fdx"
system "touch README && echo 'initial commit' >> README" system "touch README && echo 'initial commit' >> README"
system "git add ." system "git add ."
system "git commit -m 'Setup for deploy with Octopress'"
system "git push origin #{args.branch}" system "git push origin #{args.branch}"
end end
end end