Skip to content

Commit 2f70da6

Browse files
znzclaude
andcommitted
Pass --eol-warning to statichtml for EOL versions
Versions older than MINIMUM_SUPPORTED_RUBY_VERSION get an EOL warning banner in their static HTML (requires bitclust with statichtml --eol-warning support). Update the constant when a Ruby branch reaches end-of-life; see https://www.ruby-lang.org/ja/downloads/branches/ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e8b487d commit 2f70da6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ OLD_VERSIONS = %w[
55
]
66
SUPPORTED_VERSIONS = %w[3.0 3.1 3.2 3.3 3.4 4.0]
77
UNRELEASED_VERSIONS = %w[4.1]
8+
# メンテナンスが継続している最古のバージョン。これより古い版の静的 HTML には
9+
# bitclust statichtml --eol-warning で警告バナーを表示する。
10+
# EOL 状況は https://www.ruby-lang.org/ja/downloads/branches/ を参照して更新する
11+
MINIMUM_SUPPORTED_RUBY_VERSION = Gem::Version.new("3.3")
812
ALL_VERSIONS = [*OLD_VERSIONS, *SUPPORTED_VERSIONS, *UNRELEASED_VERSIONS]
913
CI_VERSIONS = [*SUPPORTED_VERSIONS, *UNRELEASED_VERSIONS]
1014
HTML_DIRECTORY_BASE = ENV.fetch("HTML_DIRECTORY_BASE", "/tmp/html/")
@@ -60,6 +64,7 @@ def generate_statichtml(version)
6064
"--fs-casesensitive",
6165
"--canonical-base-url=https://docs.ruby-lang.org/ja/latest/",
6266
]
67+
commands << "--eol-warning" if MINIMUM_SUPPORTED_RUBY_VERSION > version
6368
commands << "--edit-base-url=https://github.com/rurema/doctree/edit/master/" unless ENV['CI']
6469
# To suppress progress bar
6570
# because it exceeded Travis CI max log length

0 commit comments

Comments
 (0)