Skip to content

Remove JRuby on Windows workaround #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,6 @@ unless RUBY_PLATFORM == 'java'
# default_tasks << :yardstick
end

if RUBY_PLATFORM == 'java' && Gem.win_platform?
# Reimplement the :build and :install task for JRuby on Windows
# There is a bug in JRuby on Windows that makes the `build` task from `bundler/gem_tasks` fail.
# Once https://github.com/jruby/jruby/issues/6516 is fixed, this block can be deleted.
version = Git::VERSION
pkg_name = 'git'
gem_file = "pkg/#{pkg_name}-#{version}.gem"

Rake::Task[:build].clear
task :build do
FileUtils.mkdir 'pkg' unless File.exist? 'pkg'
`gem build #{pkg_name}.gemspec --output "#{gem_file}" --quiet`
raise 'Gem build failed' unless $CHILD_STATUS.success?
puts "#{pkg_name} #{version} built to #{gem_file}."
end

Rake::Task[:install].clear
task :install => :build do
`gem install #{gem_file} --quiet`
raise 'Gem install failed' unless $CHILD_STATUS.success?
puts "#{pkg_name} (#{version}) installed."
end

CLOBBER << gem_file
end

default_tasks << :build

task default: default_tasks
Expand Down