Add experimental-otp input opt-in flag
This commit is contained in:
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -3321,13 +3321,17 @@ async function main() {
|
||||
elixirSpec,
|
||||
otpVersion
|
||||
)
|
||||
const osVersion = getOSVersion()
|
||||
|
||||
let installHex = core.getInput('install-hex')
|
||||
installHex = installHex == null ? 'true' : installHex
|
||||
|
||||
let installRebar = core.getInput('install-rebar')
|
||||
installRebar = installRebar == null ? 'true' : installRebar
|
||||
|
||||
const experimentalOTP = core.getInput('experimental-otp')
|
||||
const osVersion =
|
||||
experimentalOTP === 'true' ? getRunnerOSVersion() : 'ubuntu-14.04'
|
||||
|
||||
console.log(`##[group]Installing OTP ${otpVersion} - built on ${osVersion}`)
|
||||
await installOTP(otpVersion, osVersion)
|
||||
console.log(`##[endgroup]`)
|
||||
@@ -3359,7 +3363,7 @@ async function getOtpVersion(spec) {
|
||||
return getVersionFromSpec(spec, await getOtpVersions()) || spec
|
||||
}
|
||||
|
||||
function getOSVersion() {
|
||||
function getRunnerOSVersion(experimentalOTP) {
|
||||
const mapToUbuntuVersion = {
|
||||
ubuntu16: 'ubuntu-16.04',
|
||||
ubuntu18: 'ubuntu-18.04',
|
||||
|
||||
@@ -23,13 +23,17 @@ async function main() {
|
||||
elixirSpec,
|
||||
otpVersion
|
||||
)
|
||||
const osVersion = getOSVersion()
|
||||
|
||||
let installHex = core.getInput('install-hex')
|
||||
installHex = installHex == null ? 'true' : installHex
|
||||
|
||||
let installRebar = core.getInput('install-rebar')
|
||||
installRebar = installRebar == null ? 'true' : installRebar
|
||||
|
||||
const experimentalOTP = core.getInput('experimental-otp')
|
||||
const osVersion =
|
||||
experimentalOTP === 'true' ? getRunnerOSVersion() : 'ubuntu-14.04'
|
||||
|
||||
console.log(`##[group]Installing OTP ${otpVersion} - built on ${osVersion}`)
|
||||
await installOTP(otpVersion, osVersion)
|
||||
console.log(`##[endgroup]`)
|
||||
@@ -61,7 +65,7 @@ async function getOtpVersion(spec) {
|
||||
return getVersionFromSpec(spec, await getOtpVersions()) || spec
|
||||
}
|
||||
|
||||
function getOSVersion() {
|
||||
function getRunnerOSVersion(experimentalOTP) {
|
||||
const mapToUbuntuVersion = {
|
||||
ubuntu16: 'ubuntu-16.04',
|
||||
ubuntu18: 'ubuntu-18.04',
|
||||
|
||||
Reference in New Issue
Block a user