lib/tasks/build_yardoc.rake in dtc_rake-1.0.0.pre.beta.1 vs lib/tasks/build_yardoc.rake in dtc_rake-1.0.0.pre.beta.2
- old
+ new
@@ -16,23 +16,25 @@
end
announce "Building command client yardoc pack"
output_dir = DtcRake::Config.instance.output_dir
+ output_dir_name = File.basename(output_dir) # get just the last path element (e.g. "target")
+ local_output_dir = File.join(product.gem_project, output_dir_name)
archive = product.yardoc_file_name
tmp_dir = File.basename(archive, ".zip")
FileUtils.cd product.gem_project do
[
- File.join(output_dir, tmp_dir),
- File.join(output_dir, "doc")
+ File.join(local_output_dir, tmp_dir),
+ File.join(local_output_dir, "doc")
].each do |dir|
FileUtils.rm_rf dir if File.directory? dir
end
system "yardoc"
- FileUtils.cd output_dir do
+ FileUtils.cd local_output_dir do
FileUtils.mv "doc", tmp_dir
info "Creating #{archive}"
FileUtils.rm_f archive
Zip::File.open(archive, "w") do |zip|