try to fix runcoderun
This commit is contained in:
parent
b245da5d1b
commit
ffa2f4da51
54
Rakefile
54
Rakefile
|
@ -52,35 +52,37 @@ task :spec => :check_dependencies
|
||||||
|
|
||||||
task :default => :spec
|
task :default => :spec
|
||||||
|
|
||||||
require 'rake/rdoctask'
|
unless ENV["RUN_CODE_RUN"]
|
||||||
require 'sdoc'
|
require 'rake/rdoctask'
|
||||||
|
require 'sdoc'
|
||||||
|
|
||||||
Rake::RDocTask.new do |rdoc|
|
Rake::RDocTask.new do |rdoc|
|
||||||
if File.exist?('VERSION')
|
if File.exist?('VERSION')
|
||||||
version = File.read('VERSION')
|
version = File.read('VERSION')
|
||||||
else
|
else
|
||||||
version = ""
|
version = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
# rdoc.template = 'direct'
|
# rdoc.template = 'direct'
|
||||||
|
|
||||||
rdoc.rdoc_dir = 'rdoc'
|
rdoc.rdoc_dir = 'rdoc'
|
||||||
rdoc.title = "middleman #{version}"
|
rdoc.title = "middleman #{version}"
|
||||||
rdoc.rdoc_files.include('README*')
|
rdoc.rdoc_files.include('README*')
|
||||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||||
rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb')
|
rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb')
|
||||||
rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.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
|
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
|
Rake::Task[:rerdoc].invoke
|
||||||
`git checkout gh-pages`
|
`git checkout gh-pages`
|
||||||
`ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc`
|
`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 commit -a -m "update docs"; git push origin gh-pages`
|
||||||
`git checkout master`
|
`git checkout master`
|
||||||
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue