зеркало из https://github.com/github/ruby.git
Match ABI versions precisely
"3.2.0+33" starts with "3.2.0+3", but it doesn't mean that they are the same ABI version.
This commit is contained in:
Родитель
2d5b723b2f
Коммит
abf9a32182
|
@ -109,20 +109,21 @@ curdir.glob(".bundle/{extensions,.timestamp}/*/") do |dir|
|
|||
end
|
||||
end
|
||||
|
||||
version = RbConfig::CONFIG['ruby_version']
|
||||
baseruby_version = RbConfig::CONFIG['ruby_version'] # This may not have "-static"
|
||||
curdir.glob(".bundle/{extensions,.timestamp}/#{platform}/*/") do |dir|
|
||||
unless File.basename(dir).start_with?(version)
|
||||
version = File.basename(dir).split('-', 2).first # Remove "-static" if exists
|
||||
unless version == baseruby_version
|
||||
curdir.rmdir(dir)
|
||||
end
|
||||
end
|
||||
|
||||
curdir.glob(".bundle/extensions/#{platform}/#{version}/*/") do |dir|
|
||||
curdir.glob(".bundle/extensions/#{platform}/#{baseruby_version}/*/") do |dir|
|
||||
unless curdir.exist?(".bundle/specifications/#{File.basename(dir)}.gemspec")
|
||||
curdir.rmdir(dir)
|
||||
end
|
||||
end
|
||||
|
||||
curdir.glob(".bundle/.timestamp/#{platform}/#{version}/.*.time") do |stamp|
|
||||
curdir.glob(".bundle/.timestamp/#{platform}/#{baseruby_version}/.*.time") do |stamp|
|
||||
unless curdir.directory?(File.join(".bundle", stamp[%r[/\.([^/]+)\.time\z], 1].gsub('.-.', '/')))
|
||||
curdir.unlink(stamp)
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче