Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Paxton ade4f1d567 Don't preprend v when elixir version does not start with digits (#61) 2021-07-20 14:08:24 -05:00
4 changed files with 19 additions and 2 deletions
+3
View File
@@ -103,6 +103,9 @@ jobs:
- elixir-version: '1.10.3'
otp-version: '22.3.4.1'
os: 'ubuntu-20.04'
- elixir-version: 'master'
otp-version: '23.1'
os: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v2
- name: Use erlef/setup-beam
+8
View File
@@ -187,6 +187,14 @@ async function testElixirVersions() {
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', 'loose')
simulateInput('version-type', 'strict')
spec = 'master'
otpVersion = '23.1'
expected = 'master-otp-23'
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', 'loose')
}
async function testRebar3Versions() {
+4 -1
View File
@@ -4830,7 +4830,10 @@ async function getElixirVersion(exSpec0, otpVersion) {
)
}
return `v${elixirVersionWithOTP}`
const DigitStart = new RegExp('^\\d+')
return DigitStart.test(elixirVersion)
? `v${elixirVersionWithOTP}`
: elixirVersionWithOTP
}
async function getRebar3Version(r3Spec) {
+4 -1
View File
@@ -174,7 +174,10 @@ async function getElixirVersion(exSpec0, otpVersion) {
)
}
return `v${elixirVersionWithOTP}`
const DigitStart = new RegExp('^\\d+')
return DigitStart.test(elixirVersion)
? `v${elixirVersionWithOTP}`
: elixirVersionWithOTP
}
async function getRebar3Version(r3Spec) {