mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-14 06:54:20 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3197025b07 | ||
|
|
28def02321 |
@@ -15,7 +15,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ]
|
os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ]
|
||||||
# Use various version syntaxes here for testing
|
# Use various version syntaxes here for testing
|
||||||
ruby: [ .ruby-version, .tool-versions, 2.2, 2.3, ruby-head, jruby, truffleruby, truffleruby-head, rubinius ]
|
ruby: [ .ruby-version, .tool-versions, 2.2, 2.3, ruby-head, jruby, jruby-head, truffleruby, truffleruby-head, rubinius ]
|
||||||
exclude:
|
exclude:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
ruby: truffleruby
|
ruby: truffleruby
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
|
|||||||
| Interpreter | Versions |
|
| Interpreter | Versions |
|
||||||
| ----------- | -------- |
|
| ----------- | -------- |
|
||||||
| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.9, 2.5.0 - 2.5.7, 2.6.0 - 2.6.5, 2.7.0, head |
|
| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.9, 2.5.0 - 2.5.7, 2.6.0 - 2.6.5, 2.7.0, head |
|
||||||
| JRuby | 9.2.9.0 |
|
| JRuby | 9.2.9.0, head |
|
||||||
| TruffleRuby | 19.3.0, 19.3.1, head |
|
| TruffleRuby | 19.3.0, 19.3.1, head |
|
||||||
| Rubinius | 4.14 |
|
| Rubinius | 4.14 |
|
||||||
|
|
||||||
|
|||||||
+5
-3314
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -26,8 +26,7 @@
|
|||||||
"@actions/core": "^1.1.1",
|
"@actions/core": "^1.1.1",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
"@actions/io": "^1.0.1",
|
"@actions/io": "^1.0.1",
|
||||||
"@actions/tool-cache": "^1.1.2",
|
"@actions/tool-cache": "^1.1.2"
|
||||||
"axios": "^0.19.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@zeit/ncc": "^0.20.5",
|
"@zeit/ncc": "^0.20.5",
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ export function getVersions(platform) {
|
|||||||
"head"
|
"head"
|
||||||
],
|
],
|
||||||
"jruby": [
|
"jruby": [
|
||||||
"9.2.9.0"
|
"9.2.9.0",
|
||||||
|
"head"
|
||||||
],
|
],
|
||||||
"truffleruby": [
|
"truffleruby": [
|
||||||
"19.3.0", "19.3.1",
|
"19.3.0", "19.3.1",
|
||||||
|
|||||||
+3
-10
@@ -4,7 +4,6 @@ const core = require('@actions/core')
|
|||||||
const io = require('@actions/io')
|
const io = require('@actions/io')
|
||||||
const tc = require('@actions/tool-cache')
|
const tc = require('@actions/tool-cache')
|
||||||
const rubyBuilderVersions = require('./ruby-builder-versions')
|
const rubyBuilderVersions = require('./ruby-builder-versions')
|
||||||
const axios = require('axios')
|
|
||||||
|
|
||||||
const builderReleaseTag = 'builds-no-warn'
|
const builderReleaseTag = 'builds-no-warn'
|
||||||
const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
|
const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
|
||||||
@@ -41,7 +40,7 @@ async function downloadAndExtract(platform, ruby) {
|
|||||||
return path.join(rubiesDir, ruby)
|
return path.join(rubiesDir, ruby)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDownloadURL(platform, ruby) {
|
function getDownloadURL(platform, ruby) {
|
||||||
if (ruby.endsWith('-head')) {
|
if (ruby.endsWith('-head')) {
|
||||||
return getLatestHeadBuildURL(platform, ruby)
|
return getLatestHeadBuildURL(platform, ruby)
|
||||||
} else {
|
} else {
|
||||||
@@ -49,13 +48,7 @@ async function getDownloadURL(platform, ruby) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLatestHeadBuildURL(platform, ruby) {
|
function getLatestHeadBuildURL(platform, ruby) {
|
||||||
const engine = ruby.split('-')[0]
|
const engine = ruby.split('-')[0]
|
||||||
const repository = `ruby/${engine}-dev-builder`
|
return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-head-${platform}.tar.gz`
|
||||||
const metadataURL = `https://raw.githubusercontent.com/${repository}/metadata/latest_build.tag`
|
|
||||||
const releasesURL = `https://github.com/${repository}/releases/download`
|
|
||||||
|
|
||||||
const response = await axios.get(metadataURL)
|
|
||||||
const tag = response.data.trim()
|
|
||||||
return `${releasesURL}/${tag}/${ruby}-${platform}.tar.gz`
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user