Fix rake rdoc
when the timestamp file is empty
This happens when rdoc fails during generation as the timestamp is only written on successful attemps. The file is created anyways though
This commit is contained in:
parent
de4d874474
commit
540103c6eb
@ -160,8 +160,9 @@ def configure_rdoc_files
|
||||
|
||||
# Only generate documentation for files that have been
|
||||
# changed since the API was generated.
|
||||
if Dir.exist?(api_dir) && !ENV["ALL"]
|
||||
last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
|
||||
timestamp_path = "#{api_dir}/created.rid"
|
||||
if File.exist?(timestamp_path) && !File.zero?(timestamp_path) && !ENV["ALL"]
|
||||
last_generation = DateTime.rfc2822(File.open(timestamp_path, &:readline))
|
||||
|
||||
rdoc_files.keep_if do |file|
|
||||
File.mtime(file).to_datetime > last_generation
|
||||
|
Loading…
Reference in New Issue
Block a user