Skip to content

Commit ea2002b

Browse files
committed
Require JRUBY_RUBY_VERSION for compat
Ruby 4.0 no longer works with this site, so for now use 3.4 and require an env for the equivalent Ruby compat for a given release.
1 parent c6bca47 commit ea2002b

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ end
9999

100100
task :update_for_version do
101101
version = ENV['JRUBY_VERSION'] || fail('No JRUBY_VERSION env set')
102-
update_for_version(version)
102+
ruby_version = ENV['JRUBY_RUBY_VERSION'] || fail('No JRUBY_RUBY_VERSION env set')
103+
update_for_version(version, ruby_version:)
103104
end
104105

105106
desc "Print a summary of yesterday's file downloads"

rakelib/release.rake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def release_issues(version)
7676
end
7777

7878

79-
def update_for_version(version, major=true)
80-
post_link = create_post(version)
79+
def update_for_version(version, major=true, ruby_version:)
80+
post_link = create_post(version, ruby_version:)
8181
change_versions_in('_config.yml', version, post_link)
8282
change_versions_in('download.html', version, post_link)
8383
update_links(version)
@@ -137,13 +137,13 @@ EOS
137137
File.write index_file, contents
138138
end
139139

140-
def create_post(version)
140+
def create_post(version, ruby_version:)
141141
v = version.gsub('.', '-')
142142
t = Time.now
143143
file = t.strftime("_posts/%Y-%m-%d-jruby-#{v}.markdown")
144144

145145
File.open(file, 'w') do |io|
146-
io.write(boiler_top(version))
146+
io.write(boiler_top(version, ruby_version:))
147147
io.write(release_issues(version))
148148
end
149149

@@ -182,7 +182,7 @@ def change_versions_in(filename, version, post_link)
182182
File.write(filename, new_content)
183183
end
184184

185-
def boiler_top(version, compat="3.4")=<<~"EOS"
185+
def boiler_top(version, ruby_version:)=<<~"EOS"
186186
---
187187
layout: post
188188
title: JRuby #{version} Released
@@ -193,7 +193,7 @@ def boiler_top(version, compat="3.4")=<<~"EOS"
193193
* Homepage: [https://www.jruby.org/](https://www.jruby.org/)
194194
* Download: [https://www.jruby.org/download](https://www.jruby.org/download)
195195
196-
JRuby #{version.split('.')[0..2].join('.')}.x targets Ruby #{compat} compatibility.
196+
JRuby #{version.split('.')[0..2].join('.')}.x targets Ruby #{ruby_version} compatibility.
197197
198198
Thank you to our contributors this release, you help keep JRuby moving forward!
199199

0 commit comments

Comments
 (0)