summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-21 01:30:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-21 12:19:00 +0900
commit7c98d520f4ae9bd2e2496f5bddc455af576c499f (patch)
treed4c634302895daecd65f2ae1901e84baa31c0624 /tool
parent7ba88e13e00720a3190aca3bda3e7b50b390b096 (diff)
[Bug #19892] Clean intermediate files regardless `-keep_temp`
Not to include such files in the result packages.
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot8
1 files 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