Add experimental-otp input opt-in flag

This commit is contained in:
Denis Kulicek
2020-10-29 14:27:52 +01:00
parent d114e80cc4
commit 7b728b73d0
2 changed files with 12 additions and 4 deletions

8
dist/index.js vendored
View File

@@ -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',

View File

@@ -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',