From 64d30280a1aebe9e22b6068dcf78de1fe7921bf7 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Mon, 19 Oct 2009 21:43:17 -0700 Subject: [PATCH] pull in gh-pages before pushing --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 0b08a49..15c2b66 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,7 @@ namespace :hurl do def installed?(app) not `which #{app}`.chomp.empty? end - + desc "Generate GitHub pages." task :pages => :check_dirty do require "mustache" @@ -30,12 +30,13 @@ namespace :hurl do f.puts view.render end system "git checkout gh-pages" + system "git pull origin gh-pages" system "mv new_index.html index.html" system "git commit -a -m 'auto update docs'" system "git push origin gh-pages" system "git checkout master" end - + task :check_dirty do if !`git status`.include?('nothing to commit') abort "dirty index - not publishing!"