Fix README auto update for preview/RC

This commit is contained in:
Benoit Daloze
2022-12-06 07:08:21 -06:00
parent a5e2883296
commit ee37499046
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
| Interpreter | Versions | | Interpreter | Versions |
| ----------- | -------- | | ----------- | -------- |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.2.0-preview1, head, debug, mingw, mswin, ucrt | | `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.2.0-rc1, head, debug, mingw, mswin, ucrt |
| `jruby` | 9.1.17.0 - 9.4.0.0, head | | `jruby` | 9.1.17.0 - 9.4.0.0, head |
| `truffleruby` | 19.3.0 - 22.3.0, head | | `truffleruby` | 19.3.0 - 22.3.0, head |
| `truffleruby+graalvm` | 21.2.0 - 22.3.0, head | | `truffleruby+graalvm` | 21.2.0 - 22.3.0, head |
+1 -1
View File
@@ -53,7 +53,7 @@ versions.each do |engine_version|
file = "#{__dir__}/README.md" file = "#{__dir__}/README.md"
lines = File.readlines(file) lines = File.readlines(file)
engine_line = lines.find { |line| line.start_with?("| `#{engine}`") } engine_line = lines.find { |line| line.start_with?("| `#{engine}`") }
engine_line.sub!(/(.+ (?:-|until)) (\d+(?:\.\d+)+)/) do engine_line.sub!(/(.+ (?:-|until)) (\d+(?:\.\d+)+(?:-\w+)?)/) do
if Gem::Version.new(version) > Gem::Version.new($2) if Gem::Version.new(version) > Gem::Version.new($2)
"#{$1} #{version}" "#{$1} #{version}"
else else