FEATURE: allow specifying platform name for platform specific gems (#10559)

This commit is contained in:
Faizaan Gagan 2020-08-31 08:06:04 +05:30 committed by GitHub
parent 94152e4640
commit 73c750a1db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@ module PluginGem
gems_path = File.dirname(path) + "/gems/#{RUBY_VERSION}"
spec_path = gems_path + "/specifications"
spec_file = spec_path + "/#{name}-#{version}.gemspec"
spec_file = spec_path + "/#{name}-#{version}"
spec_file += "-#{opts[:platform]}" if opts[:platform]
spec_file += ".gemspec"
unless File.exists? spec_file
command = "gem install #{name} -v #{version} -i #{gems_path} --no-document --ignore-dependencies --no-user-install"
if opts[:source]