Github Pages deployment is now using git add -A for compatability with Git 1.8.2+

This commit is contained in:
Brandon Mathis 2013-06-23 18:05:40 -05:00
parent 0e2bff1336
commit bc67475148

View File

@ -247,18 +247,21 @@ end
desc "deploy public directory to github pages" desc "deploy public directory to github pages"
multitask :push do multitask :push do
puts "## Deploying branch to Github Pages " puts "## Deploying branch to Github Pages "
puts "## Pulling any updates from Github Pages "
cd "#{deploy_dir}" do
system "git pull"
end
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
Rake::Task[:copydot].invoke(public_dir, deploy_dir) Rake::Task[:copydot].invoke(public_dir, deploy_dir)
puts "\n## copying #{public_dir} to #{deploy_dir}" puts "\n## Copying #{public_dir} to #{deploy_dir}"
cp_r "#{public_dir}/.", deploy_dir cp_r "#{public_dir}/.", deploy_dir
cd "#{deploy_dir}" do cd "#{deploy_dir}" do
system "git add ." system "git add -A"
system "git add -u"
puts "\n## Commiting: Site updated at #{Time.now.utc}" puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}" message = "Site updated at #{Time.now.utc}"
system "git commit -m \"#{message}\"" system "git commit -m \"#{message}\""
puts "\n## Pushing generated #{deploy_dir} website" puts "\n## Pushing generated #{deploy_dir} website"
system "git push origin #{deploy_branch} --force" system "git push origin #{deploy_branch}"
puts "\n## Github Pages deploy complete" puts "\n## Github Pages deploy complete"
end end
end end