From ffa2f4da517597988adcbf073b76072d9012592a Mon Sep 17 00:00:00 2001 From: tdreyno Date: Mon, 16 Nov 2009 22:24:18 -0800 Subject: [PATCH] try to fix runcoderun --- Rakefile | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/Rakefile b/Rakefile index ffd97806..b41405f5 100755 --- a/Rakefile +++ b/Rakefile @@ -52,35 +52,37 @@ task :spec => :check_dependencies task :default => :spec -require 'rake/rdoctask' -require 'sdoc' +unless ENV["RUN_CODE_RUN"] + require 'rake/rdoctask' + require 'sdoc' -Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION') - version = File.read('VERSION') - else - version = "" - end + Rake::RDocTask.new do |rdoc| + if File.exist?('VERSION') + version = File.read('VERSION') + else + version = "" + end - # rdoc.template = 'direct' + # rdoc.template = 'direct' - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "middleman #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') - rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb') - rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb') -end - -desc "Build and publish documentation using GitHub Pages." -task :pages do - if !`git status`.include?('nothing to commit') - abort "dirty index - not publishing!" + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "middleman #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') + rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb') + rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb') end + + desc "Build and publish documentation using GitHub Pages." + task :pages do + if !`git status`.include?('nothing to commit') + abort "dirty index - not publishing!" + end - Rake::Task[:rerdoc].invoke - `git checkout gh-pages` - `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc` - `git commit -a -m "update docs"; git push origin gh-pages` - `git checkout master` + Rake::Task[:rerdoc].invoke + `git checkout gh-pages` + `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc` + `git commit -a -m "update docs"; git push origin gh-pages` + `git checkout master` + end end \ No newline at end of file