Skip to content

Commit 6be0b7f

Browse files
committed
Create preview tarball from directory
Move the artifacts instead of copying to reduce waste
1 parent 7c7e4c5 commit 6be0b7f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Rakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ task :preview_docs do
5959
require "guides/rails_guides"
6060
Rake::Task[:rdoc].invoke
6161

62-
FileUtils.cp_r("doc/rdoc", "preview/api")
63-
FileUtils.cp_r("guides/output", "preview/guides")
62+
FileUtils.mv("doc/rdoc", "preview/api")
63+
FileUtils.mv("guides/output", "preview/guides")
6464

65-
system("tar -czf preview.tar.gz preview")
65+
Dir.chdir("preview") do
66+
system("tar -czf preview.tar.gz .")
67+
end
6668
end
6769

6870
desc "Bump all versions to match RAILS_VERSION"

0 commit comments

Comments
 (0)