From 6be0b7f7f3357549bf85edc297a0fa8fa037109e Mon Sep 17 00:00:00 2001 From: zzak Date: Wed, 24 Apr 2024 10:02:56 +0900 Subject: [PATCH] Create preview tarball from directory Move the artifacts instead of copying to reduce waste --- Rakefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 65a9c7a335..72ba2869a8 100644 --- a/Rakefile +++ b/Rakefile @@ -59,10 +59,12 @@ task :preview_docs do require "guides/rails_guides" Rake::Task[:rdoc].invoke - FileUtils.cp_r("doc/rdoc", "preview/api") - FileUtils.cp_r("guides/output", "preview/guides") + FileUtils.mv("doc/rdoc", "preview/api") + FileUtils.mv("guides/output", "preview/guides") - system("tar -czf preview.tar.gz preview") + Dir.chdir("preview") do + system("tar -czf preview.tar.gz .") + end end desc "Bump all versions to match RAILS_VERSION"