提交 de1227a5 编写于 作者: X Xavier Noria 提交者: GitHub

Merge pull request #25690 from robin850/speed-up-rdoc

Speed up RDoc generation when it's already been done once
...@@ -121,6 +121,19 @@ def configure_rdoc_files ...@@ -121,6 +121,19 @@ def configure_rdoc_files
rdoc_files.exclude("#{cdr}/#{pattern}") rdoc_files.exclude("#{cdr}/#{pattern}")
end end
end end
# Only generate documentation for files that have been
# changed since the API was generated.
if Dir.exist?('doc/rdoc') && !ENV['ALL']
last_generation = DateTime.rfc2822(File.open('doc/rdoc/created.rid', &:readline))
rdoc_files.keep_if do |file|
File.mtime(file).to_datetime > last_generation
end
# Nothing to do
exit(0) if rdoc_files.empty?
end
end end
def setup_horo_variables def setup_horo_variables
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册