Skip to content

Commit

Permalink
Use CPU-less platforms for windows
Browse files Browse the repository at this point in the history
There is no need to include the CPU in the platform string as there is
no compiled code shipped in the pry gems.  The only difference is the
dependency.

Pry became a victim of rubygems/rubygems#1058 which will be fixed in
rubygems/rubygems#1120.  I would also like to raise awareness of proper
use of platform parts while I'm fixing the bug in RubyGems.
  • Loading branch information
drbrain committed Apr 9, 2015
1 parent e273b1b commit ee0ea8f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,24 @@ namespace :jruby do
end


['i386-mingw32', 'i386-mswin32', 'x64-mingw32'].each do |platform|
['mswin32', 'mingw32'].each do |platform|
namespace platform do
spec = modify_base_gemspec do |s|
s.add_dependency('win32console', '~> 1.3')
s.platform = platform
s.platform = Gem::Platform.new [nil, platform, nil]
end

Gem::PackageTask.new(spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end
end

task gems: "#{platform}:gem"
end

desc "build all platform gems at once"
task :gems => [:clean, :rmgems, 'ruby:gem', 'i386-mswin32:gem', 'i386-mingw32:gem', 'x64-mingw32:gem', 'jruby:gem']
task :gems => [:clean, :rmgems, 'ruby:gem', 'jruby:gem']

desc "remove all platform gems"
task :rmgems => ['ruby:clobber_package']
Expand Down

0 comments on commit ee0ea8f

Please sign in to comment.