From 8b1ae1f96ec07517cc400679ae8118406c00f2f7 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Thu, 25 Jun 2009 00:51:23 -0700 Subject: [PATCH] Trace all invoked rake tasks. --- Rakefile | 14 +++++++++++--- extra/update_watch.rb | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index b63b45e5..f5b7cc2f 100644 --- a/Rakefile +++ b/Rakefile @@ -81,6 +81,8 @@ task :release => [:package] do end task :release_edge do + puts "#{'=' * 50} Running rake release_edge" + sh %{git checkout edge-gem} sh %{git reset --hard origin/edge-gem} sh %{git merge origin/master} @@ -153,11 +155,12 @@ rescue LoadError end task :pages do + puts "#{'=' * 50} Running rake proj PROJ=#{ENV["PROJ"].inspect}" raise 'No ENV["PROJ"]!' unless proj = ENV["PROJ"] sh %{git checkout #{proj}-pages} sh %{git reset --hard origin/#{proj}-pages} - sh %{rake build} + sh %{rake build --trace} sh %{rsync -av --delete site/ /var/www/#{proj}-pages} end @@ -246,15 +249,20 @@ end # ----- Handling Updates ----- task :handle_update do + puts + puts + puts '=' * 150 + puts "Running rake REF=#{ENV["REF"].inspect}" + sh %{git checkout master} sh %{git fetch origin} sh %{git reset --hard origin/master} begin if ENV["REF"] == "refs/heads/master" - sh %{rake release_edge} + sh %{rake release_edge --trace} elsif ENV["REF"] =~ %r{^refs/heads/(haml|sass)-pages$} - sh %{rake pages PROJ=#{$1}} + sh %{rake pages --trace PROJ=#{$1}} end ensure sh %{git reset --hard HEAD} diff --git a/extra/update_watch.rb b/extra/update_watch.rb index 868ce08b..bbdde6a1 100644 --- a/extra/update_watch.rb +++ b/extra/update_watch.rb @@ -6,5 +6,5 @@ set :environment, :production Dir.chdir(File.dirname(__FILE__) + "/..") post "/" do - system %{rake handle_update REF=#{JSON.parse(params["payload"])["ref"].inspect}} + system %{rake handle_update --trace REF=#{JSON.parse(params["payload"])["ref"].inspect}} end