Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
Updated theweb:generate Rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
karmi committed Jun 8, 2011
1 parent a81b4bb commit 9dd4fb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -55,17 +55,17 @@ namespace :web do
task :update => :generate do
current_branch = `git branch --no-color`.split("\n").select { |line| line =~ /^\* / }.to_s.gsub(/\* (.*)/, '\1')
(puts "Unable to determine current branch"; exit(1) ) unless current_branch
system "git stash save && git checkout web"
system "git checkout web"
system "cp examples/tire-dsl.html index.html"
system "git add index.html && git co -m 'Updated Tire website'"
system "git push origin web:gh-pages -f"
system "git checkout #{current_branch} && git stash pop"
system "git checkout #{current_branch}"
end

desc "Generate the Rocco documentation page"
task :generate do
system "rocco examples/tire-dsl.rb"
html = File.read('examples/tire-dsl.html').gsub!(/tire\-dsl\.rb/, 'tire.rb')
html = File.read('examples/tire-dsl.html').gsub!(/>tire\-dsl\.rb</, '>tire.rb<')
File.open('examples/tire-dsl.html', 'w') { |f| f.write html }
system "open examples/tire-dsl.html"
end
Expand Down

0 comments on commit 9dd4fb7

Please sign in to comment.