mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6647273ce9 | ||
|
|
071acb9122 | ||
|
|
ba5b846810 | ||
|
|
81be0938f7 | ||
|
|
b04e5b8846 | ||
|
|
a7df86edc6 | ||
|
|
8137829321 | ||
|
|
a1d280134e | ||
|
|
d01e942f09 | ||
|
|
e74945bcae | ||
|
|
8bff4379b9 | ||
|
|
23b9735206 |
@@ -15,13 +15,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu, macos, windows ]
|
os: [ ubuntu, macos, windows ]
|
||||||
# Use various version syntax here for testing
|
# 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:
|
include:
|
||||||
- { os: ubuntu, ruby: rubinius }
|
- { os: ubuntu, ruby: rubinius }
|
||||||
- { os: windows, ruby: mingw }
|
- { os: windows, ruby: mingw }
|
||||||
- { os: windows, ruby: mswin }
|
- { os: windows, ruby: mswin }
|
||||||
exclude:
|
exclude:
|
||||||
- { os: windows, ruby: ruby-debug }
|
- { os: windows, ruby: debug }
|
||||||
- { os: windows, ruby: truffleruby }
|
- { os: windows, ruby: truffleruby }
|
||||||
- { os: windows, ruby: truffleruby-head }
|
- { os: windows, ruby: truffleruby-head }
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
|
|||||||
| ----------- | -------- |
|
| ----------- | -------- |
|
||||||
| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.10, 2.5.0 - 2.5.8, 2.6.0 - 2.6.6, 2.7.1, head, debug, mingw, mswin |
|
| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.10, 2.5.0 - 2.5.8, 2.6.0 - 2.6.6, 2.7.1, head, debug, mingw, mswin |
|
||||||
| JRuby | 9.1.17.0, 9.2.9.0 - 9.2.11.1, head |
|
| JRuby | 9.1.17.0, 9.2.9.0 - 9.2.11.1, head |
|
||||||
| TruffleRuby | 19.3.0 - 20.0.0, head |
|
| TruffleRuby | 19.3.0 - 20.1.0, head |
|
||||||
| Rubinius | 4.14 |
|
| Rubinius | 4.14 |
|
||||||
|
|
||||||
`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`).
|
`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`).
|
||||||
@@ -35,7 +35,7 @@ The action works for all [GitHub-hosted runners](https://help.github.com/en/acti
|
|||||||
|
|
||||||
| Operating System | Versions |
|
| Operating System | Versions |
|
||||||
| ----------- | -------- |
|
| ----------- | -------- |
|
||||||
| Ubuntu | `ubuntu-latest` (= `ubuntu-18.04`), `ubuntu-16.04` |
|
| Ubuntu | `ubuntu-20.04`, `ubuntu-latest` (= `ubuntu-18.04`), `ubuntu-16.04` |
|
||||||
| macOS | `macos-latest` |
|
| macOS | `macos-latest` |
|
||||||
| Windows | `windows-latest` |
|
| Windows | `windows-latest` |
|
||||||
|
|
||||||
@@ -64,13 +64,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6
|
ruby-version: 2.6 # Not needed with a .ruby-version file
|
||||||
- run: ruby -v
|
- run: bundle install
|
||||||
|
- run: bundle exec rake
|
||||||
```
|
```
|
||||||
|
|
||||||
### Matrix
|
### Matrix
|
||||||
|
|
||||||
This matrix tests all stable releases of MRI, JRuby and TruffleRuby on Ubuntu and macOS.
|
This matrix tests all stable releases and `head` versions of MRI, JRuby and TruffleRuby on Ubuntu and macOS.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: My workflow
|
name: My workflow
|
||||||
@@ -80,17 +81,23 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ubuntu, macos]
|
||||||
ruby: [ 2.4, 2.5, 2.6, 2.7, jruby, truffleruby ]
|
ruby: [2.5, 2.6, 2.7, head, debug, jruby, jruby-head, truffleruby, truffleruby-head]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}-latest
|
||||||
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
- run: ruby -v
|
- run: bundle install
|
||||||
|
- run: bundle exec rake
|
||||||
```
|
```
|
||||||
|
|
||||||
|
See the GitHub Actions documentation for more details about the
|
||||||
|
[workflow syntax](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions)
|
||||||
|
and the [condition and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions).
|
||||||
|
|
||||||
### Supported Version Syntax
|
### Supported Version Syntax
|
||||||
|
|
||||||
* engine-version like `ruby-2.6.5` and `truffleruby-19.3.0`
|
* engine-version like `ruby-2.6.5` and `truffleruby-19.3.0`
|
||||||
@@ -105,7 +112,7 @@ jobs:
|
|||||||
|
|
||||||
By default, if there is a `Gemfile.lock` file with a `BUNDLED WITH` section,
|
By default, if there is a `Gemfile.lock` file with a `BUNDLED WITH` section,
|
||||||
the latest version of Bundler with the same major version will be installed.
|
the latest version of Bundler with the same major version will be installed.
|
||||||
Otherwise, the latest Bundler version is installed (except for Ruby 2.2 where only Bundler 1 is supported).
|
Otherwise, the latest Bundler version is installed (except for Ruby 2.2 and 2.3 where only Bundler 1 is supported).
|
||||||
|
|
||||||
This behavior can be customized, see [action.yml](action.yml) for details about the `bundler` input.
|
This behavior can be customized, see [action.yml](action.yml) for details about the `bundler` input.
|
||||||
|
|
||||||
@@ -122,8 +129,9 @@ You can cache the installed gems with these two steps:
|
|||||||
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
|
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
|
||||||
- name: bundle install
|
- name: bundle install
|
||||||
run: |
|
run: |
|
||||||
|
bundle config deployment true
|
||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
bundle install --jobs 4 --retry 3
|
bundle install --jobs 4
|
||||||
```
|
```
|
||||||
|
|
||||||
When using a single OS, replace `${{ matrix.os }}` with the OS.
|
When using a single OS, replace `${{ matrix.os }}` with the OS.
|
||||||
|
|||||||
+33
-15
@@ -969,6 +969,7 @@ module.exports = require("os");
|
|||||||
"use strict";
|
"use strict";
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "run", function() { return run; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "run", function() { return run; });
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setupRuby", function() { return setupRuby; });
|
||||||
const os = __webpack_require__(87)
|
const os = __webpack_require__(87)
|
||||||
const fs = __webpack_require__(747)
|
const fs = __webpack_require__(747)
|
||||||
const path = __webpack_require__(622)
|
const path = __webpack_require__(622)
|
||||||
@@ -976,19 +977,31 @@ const core = __webpack_require__(470)
|
|||||||
const exec = __webpack_require__(986)
|
const exec = __webpack_require__(986)
|
||||||
const common = __webpack_require__(239)
|
const common = __webpack_require__(239)
|
||||||
|
|
||||||
|
const inputDefaults = {
|
||||||
|
'ruby-version': 'default',
|
||||||
|
'bundler': 'default',
|
||||||
|
'working-directory': '.',
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
await main()
|
const options = {}
|
||||||
|
for (const key in inputDefaults) {
|
||||||
|
options[key] = core.getInput(key)
|
||||||
|
}
|
||||||
|
await setupRuby(options)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function setupRuby(options) {
|
||||||
process.chdir(core.getInput('working-directory'))
|
const inputs = { ...inputDefaults, ...options }
|
||||||
|
|
||||||
|
process.chdir(inputs['working-directory'])
|
||||||
|
|
||||||
const platform = common.getVirtualEnvironmentName()
|
const platform = common.getVirtualEnvironmentName()
|
||||||
const [engine, parsedVersion] = parseRubyEngineAndVersion(core.getInput('ruby-version'))
|
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
|
||||||
|
|
||||||
let installer
|
let installer
|
||||||
if (platform === 'windows-latest' && engine !== 'jruby') {
|
if (platform === 'windows-latest' && engine !== 'jruby') {
|
||||||
@@ -1006,9 +1019,9 @@ async function main() {
|
|||||||
|
|
||||||
setupPath(newPathEntries)
|
setupPath(newPathEntries)
|
||||||
|
|
||||||
if (core.getInput('bundler') !== 'none') {
|
if (inputs['bundler'] !== 'none') {
|
||||||
await common.measure('Installing Bundler', async () =>
|
await common.measure('Installing Bundler', async () =>
|
||||||
installBundler(platform, rubyPrefix, engine, version))
|
installBundler(inputs['bundler'], platform, rubyPrefix, engine, version))
|
||||||
}
|
}
|
||||||
|
|
||||||
core.setOutput('ruby-prefix', rubyPrefix)
|
core.setOutput('ruby-prefix', rubyPrefix)
|
||||||
@@ -1036,7 +1049,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let engine, version
|
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'
|
engine = 'ruby'
|
||||||
version = rubyVersion
|
version = rubyVersion
|
||||||
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
||||||
@@ -1057,7 +1070,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
|
|||||||
let version = parsedVersion
|
let version = parsedVersion
|
||||||
if (!engineVersions.includes(parsedVersion)) {
|
if (!engineVersions.includes(parsedVersion)) {
|
||||||
const latestToFirstVersion = engineVersions.slice().reverse()
|
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) {
|
if (found) {
|
||||||
version = found
|
version = found
|
||||||
} else {
|
} else {
|
||||||
@@ -1113,8 +1126,8 @@ function readBundledWithFromGemfileLock() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
async function installBundler(bundlerVersionInput, platform, rubyPrefix, engine, rubyVersion) {
|
||||||
var bundlerVersion = core.getInput('bundler')
|
var bundlerVersion = bundlerVersionInput
|
||||||
|
|
||||||
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
|
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
|
||||||
bundlerVersion = readBundledWithFromGemfileLock()
|
bundlerVersion = readBundledWithFromGemfileLock()
|
||||||
@@ -1127,15 +1140,20 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
|||||||
bundlerVersion = '2'
|
bundlerVersion = '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rubyVersion.startsWith('2.2')) {
|
if (/^\d+/.test(bundlerVersion)) {
|
||||||
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby 2.2')
|
|
||||||
bundlerVersion = '1'
|
|
||||||
} else if (/^\d+/.test(bundlerVersion)) {
|
|
||||||
// OK
|
// OK
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Cannot parse bundler input: ${bundlerVersion}`)
|
throw new Error(`Cannot parse bundler input: ${bundlerVersion}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rubyVersion.startsWith('2.2')) {
|
||||||
|
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby 2.2')
|
||||||
|
bundlerVersion = '1'
|
||||||
|
} else if (rubyVersion.startsWith('2.3')) {
|
||||||
|
console.log('Ruby 2.3 has a bug with Bundler 2 (https://github.com/rubygems/rubygems/issues/3570), using Bundler 1 instead on Ruby 2.3')
|
||||||
|
bundlerVersion = '1'
|
||||||
|
}
|
||||||
|
|
||||||
if (engine === 'ruby' && common.isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
if (engine === 'ruby' && common.isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
||||||
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
||||||
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
||||||
@@ -1471,7 +1489,7 @@ function getVersions(platform) {
|
|||||||
],
|
],
|
||||||
"truffleruby": [
|
"truffleruby": [
|
||||||
"19.3.0", "19.3.1",
|
"19.3.0", "19.3.1",
|
||||||
"20.0.0",
|
"20.0.0", "20.1.0",
|
||||||
"head"
|
"head"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,31 @@ const core = require('@actions/core')
|
|||||||
const exec = require('@actions/exec')
|
const exec = require('@actions/exec')
|
||||||
const common = require('./common')
|
const common = require('./common')
|
||||||
|
|
||||||
|
const inputDefaults = {
|
||||||
|
'ruby-version': 'default',
|
||||||
|
'bundler': 'default',
|
||||||
|
'working-directory': '.',
|
||||||
|
}
|
||||||
|
|
||||||
export async function run() {
|
export async function run() {
|
||||||
try {
|
try {
|
||||||
await main()
|
const options = {}
|
||||||
|
for (const key in inputDefaults) {
|
||||||
|
options[key] = core.getInput(key)
|
||||||
|
}
|
||||||
|
await setupRuby(options)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
export async function setupRuby(options) {
|
||||||
process.chdir(core.getInput('working-directory'))
|
const inputs = { ...inputDefaults, ...options }
|
||||||
|
|
||||||
|
process.chdir(inputs['working-directory'])
|
||||||
|
|
||||||
const platform = common.getVirtualEnvironmentName()
|
const platform = common.getVirtualEnvironmentName()
|
||||||
const [engine, parsedVersion] = parseRubyEngineAndVersion(core.getInput('ruby-version'))
|
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
|
||||||
|
|
||||||
let installer
|
let installer
|
||||||
if (platform === 'windows-latest' && engine !== 'jruby') {
|
if (platform === 'windows-latest' && engine !== 'jruby') {
|
||||||
@@ -35,9 +47,9 @@ async function main() {
|
|||||||
|
|
||||||
setupPath(newPathEntries)
|
setupPath(newPathEntries)
|
||||||
|
|
||||||
if (core.getInput('bundler') !== 'none') {
|
if (inputs['bundler'] !== 'none') {
|
||||||
await common.measure('Installing Bundler', async () =>
|
await common.measure('Installing Bundler', async () =>
|
||||||
installBundler(platform, rubyPrefix, engine, version))
|
installBundler(inputs['bundler'], platform, rubyPrefix, engine, version))
|
||||||
}
|
}
|
||||||
|
|
||||||
core.setOutput('ruby-prefix', rubyPrefix)
|
core.setOutput('ruby-prefix', rubyPrefix)
|
||||||
@@ -65,7 +77,7 @@ function parseRubyEngineAndVersion(rubyVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let engine, version
|
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'
|
engine = 'ruby'
|
||||||
version = rubyVersion
|
version = rubyVersion
|
||||||
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
} else if (!rubyVersion.includes('-')) { // myruby -> myruby-stableVersion
|
||||||
@@ -86,7 +98,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
|
|||||||
let version = parsedVersion
|
let version = parsedVersion
|
||||||
if (!engineVersions.includes(parsedVersion)) {
|
if (!engineVersions.includes(parsedVersion)) {
|
||||||
const latestToFirstVersion = engineVersions.slice().reverse()
|
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) {
|
if (found) {
|
||||||
version = found
|
version = found
|
||||||
} else {
|
} else {
|
||||||
@@ -142,8 +154,8 @@ function readBundledWithFromGemfileLock() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
async function installBundler(bundlerVersionInput, platform, rubyPrefix, engine, rubyVersion) {
|
||||||
var bundlerVersion = core.getInput('bundler')
|
var bundlerVersion = bundlerVersionInput
|
||||||
|
|
||||||
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
|
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
|
||||||
bundlerVersion = readBundledWithFromGemfileLock()
|
bundlerVersion = readBundledWithFromGemfileLock()
|
||||||
@@ -156,15 +168,20 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
|||||||
bundlerVersion = '2'
|
bundlerVersion = '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rubyVersion.startsWith('2.2')) {
|
if (/^\d+/.test(bundlerVersion)) {
|
||||||
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby 2.2')
|
|
||||||
bundlerVersion = '1'
|
|
||||||
} else if (/^\d+/.test(bundlerVersion)) {
|
|
||||||
// OK
|
// OK
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Cannot parse bundler input: ${bundlerVersion}`)
|
throw new Error(`Cannot parse bundler input: ${bundlerVersion}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rubyVersion.startsWith('2.2')) {
|
||||||
|
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby 2.2')
|
||||||
|
bundlerVersion = '1'
|
||||||
|
} else if (rubyVersion.startsWith('2.3')) {
|
||||||
|
console.log('Ruby 2.3 has a bug with Bundler 2 (https://github.com/rubygems/rubygems/issues/3570), using Bundler 1 instead on Ruby 2.3')
|
||||||
|
bundlerVersion = '1'
|
||||||
|
}
|
||||||
|
|
||||||
if (engine === 'ruby' && common.isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
if (engine === 'ruby' && common.isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
||||||
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
||||||
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function getVersions(platform) {
|
|||||||
],
|
],
|
||||||
"truffleruby": [
|
"truffleruby": [
|
||||||
"19.3.0", "19.3.1",
|
"19.3.0", "19.3.1",
|
||||||
"20.0.0",
|
"20.0.0", "20.1.0",
|
||||||
"head"
|
"head"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
hash = File.read('ruby-builder-versions.js')[/\bversions = {[^}]+}/]
|
||||||
|
versions = eval hash
|
||||||
|
|
||||||
|
by_minor = versions[:ruby].group_by { |v| v[/^\d\.\d/] }
|
||||||
|
|
||||||
|
p by_minor['2.2']
|
||||||
|
p by_minor['2.3']
|
||||||
|
|
||||||
|
(4..7).each do |minor|
|
||||||
|
p by_minor["2.#{minor}"].map { |v| "ruby-#{v}" }
|
||||||
|
end
|
||||||
|
|
||||||
|
p (versions[:jruby] - %w[head]).map { |v| "jruby-#{v}" }
|
||||||
|
|
||||||
|
p (versions[:truffleruby] - %w[head]).map { |v| "truffleruby-#{v}" }
|
||||||
Reference in New Issue
Block a user