DEV: Search for `-gnu` gem variants (#27347)

> Platform names with a *-linux suffix are aliases for *-linux-gnu

Should fix the ffi upgrade issue
This commit is contained in:
Jarek Radosz 2024-06-05 14:58:02 +02:00 committed by GitHub
parent fb812a48ab
commit b618d08d36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -34,12 +34,13 @@ module PluginGem
def self.platform_variants(spec_file)
platform_less = "#{spec_file}.gemspec"
platform_full = "#{spec_file}-#{RUBY_PLATFORM}.gemspec"
platform_version_less =
"#{spec_file}-#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}.gemspec"
[platform_less, platform_full, platform_version_less]
variants = [platform_less, platform_full, platform_version_less]
variants << "#{spec_file}-#{RUBY_PLATFORM}-gnu.gemspec" if RUBY_PLATFORM.end_with?("-linux")
variants.uniq
end
end