aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2013-06-23 18:05:40 -0500
committerBrandon Mathis <brandon@imathis.com>2013-06-23 18:06:02 -0500
commitbc674751486a2a5d423e6c6a0aa8778da3c73231 (patch)
tree966d3af73b2391171775335555f5a137b3e9f913 /Rakefile
parent0e2bff13363d24dd9d7cdab3503b1c8bdfc5111f (diff)
downloadmy_new_personal_website-bc674751486a2a5d423e6c6a0aa8778da3c73231.tar.xz
my_new_personal_website-bc674751486a2a5d423e6c6a0aa8778da3c73231.zip
Github Pages deployment is now using `git add -A` for compatability with Git 1.8.2+
Diffstat (limited to '')
-rw-r--r--Rakefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index b9daf00c..f3ada93d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -247,18 +247,21 @@ end
desc "deploy public directory to github pages"
multitask :push do
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) }
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
cd "#{deploy_dir}" do
- system "git add ."
- system "git add -u"
+ system "git add -A"
puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}"
system "git commit -m \"#{message}\""
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"
end
end