mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23b9735206 |
@@ -15,13 +15,13 @@ jobs:
|
||||
matrix:
|
||||
os: [ ubuntu, macos, windows ]
|
||||
# Use various version syntax here for testing
|
||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6.6, 2.7, ruby-head, ruby-debug, jruby-9.1, jruby, jruby-head, truffleruby, truffleruby-head ]
|
||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6.6, 2.7, ruby-head, debug, jruby-9.1, jruby, jruby-head, truffleruby, truffleruby-head ]
|
||||
include:
|
||||
- { os: ubuntu, ruby: rubinius }
|
||||
- { os: windows, ruby: mingw }
|
||||
- { os: windows, ruby: mswin }
|
||||
exclude:
|
||||
- { os: windows, ruby: ruby-debug }
|
||||
- { os: windows, ruby: debug }
|
||||
- { os: windows, ruby: truffleruby }
|
||||
- { os: windows, ruby: truffleruby-head }
|
||||
|
||||
|
||||
+2
-2
@@ -1036,7 +1036,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
|
||||
}
|
||||
|
||||
let engine, version
|
||||
if (rubyVersion.match(/^(\d+|head|mingw|mswin)/)) { // X.Y.Z => ruby-X.Y.Z
|
||||
if (rubyVersion.match(/^(\d+)/) || common.isHeadVersion(rubyVersion)) { // X.Y.Z => ruby-X.Y.Z
|
||||
engine = 'ruby'
|
||||
version = rubyVersion
|
||||
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
||||
@@ -1057,7 +1057,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
|
||||
let version = parsedVersion
|
||||
if (!engineVersions.includes(parsedVersion)) {
|
||||
const latestToFirstVersion = engineVersions.slice().reverse()
|
||||
const found = latestToFirstVersion.find(v => v !== 'head' && v.startsWith(parsedVersion))
|
||||
const found = latestToFirstVersion.find(v => !common.isHeadVersion(v) && v.startsWith(parsedVersion))
|
||||
if (found) {
|
||||
version = found
|
||||
} else {
|
||||
|
||||
@@ -65,7 +65,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
|
||||
}
|
||||
|
||||
let engine, version
|
||||
if (rubyVersion.match(/^(\d+|head|mingw|mswin)/)) { // X.Y.Z => ruby-X.Y.Z
|
||||
if (rubyVersion.match(/^(\d+)/) || common.isHeadVersion(rubyVersion)) { // X.Y.Z => ruby-X.Y.Z
|
||||
engine = 'ruby'
|
||||
version = rubyVersion
|
||||
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
||||
@@ -86,7 +86,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
|
||||
let version = parsedVersion
|
||||
if (!engineVersions.includes(parsedVersion)) {
|
||||
const latestToFirstVersion = engineVersions.slice().reverse()
|
||||
const found = latestToFirstVersion.find(v => v !== 'head' && v.startsWith(parsedVersion))
|
||||
const found = latestToFirstVersion.find(v => !common.isHeadVersion(v) && v.startsWith(parsedVersion))
|
||||
if (found) {
|
||||
version = found
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user