From 7c98d520f4ae9bd2e2496f5bddc455af576c499f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 21 Sep 2023 01:30:17 +0900 Subject: [PATCH] [Bug #19892] Clean intermediate files regardless `-keep_temp` Not to include such files in the result packages. --- tool/make-snapshot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/make-snapshot b/tool/make-snapshot index eb26a87cc4..154ee89b4c 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -518,8 +518,7 @@ touch-unicode-files: end vcs.after_export(".") if exported clean.concat(Dir.glob("ext/**/autom4te.cache")) - FileUtils.rm_rf(clean) unless $keep_temp - FileUtils.rm_rf(".downloaded-cache") + clean.add(".downloaded-cache") if File.exist?("gems/bundled_gems") gems = Dir.glob("gems/*.gem") gems -= File.readlines("gems/bundled_gems").map {|line| @@ -527,10 +526,11 @@ touch-unicode-files: name, version, _ = line.split(' ') "gems/#{name}-#{version}.gem" } - FileUtils.rm_f(gems) + clean.concat(gems) else - FileUtils.rm_rf("gems") + clean.add("gems") end + FileUtils.rm_rf(clean) if modified touch_all(modified, "**/*/", 0) do |name, stat| stat.mtime > modified