Skip to content

Commit

Permalink
Trace all invoked rake tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Jun 25, 2009
1 parent 908b15f commit 8b1ae1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Rakefile
Expand Up @@ -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}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion extra/update_watch.rb
Expand Up @@ -6,5 +6,5 @@
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

0 comments on commit 8b1ae1f

Please sign in to comment.