Skip to content

Commit b2475db

Browse files
authored
Merge pull request #302 from prometheus/sinjo-fix-jruby-build
Fix JRuby 9.3 build
2 parents 6fbdfa9 + 667626b commit b2475db

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@ jobs:
1212

1313
steps:
1414
- checkout
15-
# JRuby <= 9.2.x is no longer supported by the `rubygems-update` gem, which now
16-
# requires at least Ruby 2.6 compatibility.
15+
# We need to limit the version of Rubygems that we update to for some of the older
16+
# JRuby versions. Specifically:
17+
#
18+
# - JRuby 9.2.x targets Ruby 2.5, and Rubygems 3.3.26 was the last version to
19+
# support that
20+
# - JRuby 9.3.x targets Ruby 2.6, and version 3.4.22 was the last version to
21+
# support that
1722
#
1823
# For now, we'll pin to the last supported version. We can drop this check once we
1924
# drop all those versions of JRuby.
2025
- run: |
21-
running_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0")')
22-
if [[ "${running_old_ruby}" == "true" ]]; then
26+
running_very_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0")')
27+
running_moderately_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0")')
28+
if [[ "${running_very_old_ruby}" == "true" ]]; then
2329
gem update --system 3.3.26
30+
elif [[ "${running_moderately_old_ruby}" == "true" ]]; then
31+
gem update --system 3.4.22
2432
else
2533
gem update --system
2634
fi

0 commit comments

Comments
 (0)