summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-20 23:57:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-20 23:57:53 +0000
commitde89cd4ba8509859fa04acd3a0e5a2c9088e23c2 (patch)
treef113cbfedb9538b6e172b827c8b41d2f287072c1 /tool
parentdf0dcd4815873462769e171224b1705be506f440 (diff)
make-snapshot: remove unused files
* tool/make-snapshot (package): remove working directories and unused files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot10
1 files changed, 10 insertions, 0 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index e873564..5bd2115 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -311,6 +311,16 @@ def package(vcs, rev, destdir, tmp = nil)
end
vcs.after_export(".") if exported
FileUtils.rm_rf(clean)
+ FileUtils.rm_rf(".downloaded-cache")
+ if File.exist?("gems/bundled_gems")
+ gems = Dir.glob("gems/*.gem")
+ gems -= File.readlines("gems/bundled_gems").map {|line|
+ 'gems/'+line.split(' ').join('-')+'.gem'
+ }
+ FileUtils.rm_f(gems)
+ else
+ FileUtils.rm_rf("gems")
+ end
unless $?.success?
puts " failed"
return