зеркало из https://github.com/github/ruby.git
make-snapshot: reuse downloaded files
* tool/make-snapshot (package): reuse already downloaded files if existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
238d8586df
Коммит
825680a106
|
@ -180,10 +180,17 @@ def package(vcs, rev, destdir, tmp = nil)
|
|||
else
|
||||
v = "ruby"
|
||||
puts "Exporting #{rev}@#{revision}"
|
||||
unless vcs.export(revision, url, tmp ? File.join(tmp, v) : v) {|line| print line}
|
||||
exported = tmp ? File.join(tmp, v) : v
|
||||
unless vcs.export(revision, url, exported) {|line| print line}
|
||||
warn("Export failed")
|
||||
return
|
||||
end
|
||||
if $srcdir
|
||||
Dir.glob($srcdir + "/{tool/config.{guess,sub},gems/*.gem}") do |file|
|
||||
puts "copying #{file}"
|
||||
FileUtils.cp(file, exported + file[$srcdir.size..-1], preserve: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Dir.chdir(tmp) if tmp
|
||||
|
|
Загрузка…
Ссылка в новой задаче