Test on top of Erlang/OTP 25+ (not RC) (#118)

ac7b7d5 · Paulo F. Oliveira · 2022-05-30 14:11

8 files +26 -14
Message
{commit_body(@commit)}

Files changed

modified .github/workflows/ubuntu.yml
+11 −1
@@ -21,7 +21,17 @@ jobs:
21 21 fail-fast: false
22 22 matrix:
23 23 combo:
24 - otp-version: '25.0-rc1'
24 + - otp-version: '25.0'
25 + elixir-version: 'v1.13.4-otp-25'
26 + rebar3-version: '3.18.0'
27 + os: 'ubuntu-latest'
28 + version-type: 'strict'
29 + - otp-version: '25.0'
30 + elixir-version: 'v1.13.4'
31 + rebar3-version: '3.18.0'
32 + os: 'ubuntu-latest'
33 + version-type: 'strict'
34 + - otp-version: '25'
25 35 rebar3-version: 'nightly'
26 36 os: 'ubuntu-latest'
27 37 - otp-version: '24'
modified .github/workflows/windows.yml
+1 −1
@@ -21,7 +21,7 @@ jobs:
21 21 fail-fast: false
22 22 matrix:
23 23 combo:
24 - otp-version: '25.0-rc1'
24 + - otp-version: '25'
25 25 rebar3-version: 'nightly'
26 26 os: 'windows-latest'
27 27 - otp-version: '24.0.2'
modified dist/index.js
+7 −6
@@ -6193,7 +6193,7 @@ async function getOTPVersion(otpSpec0, osVersion) {
6193 6193 const otpVersions = await getOTPVersions(osVersion)
6194 6194 const otpSpec = otpSpec0.match(/^(OTP-)?([^ ]+)/)
6195 6195 let otpVersion
6196 if (otpSpec[1]) {
6196 + if (otpSpec[1] && !isStrictVersion()) {
6197 6197 throw new Error(
6198 6198 `Requested Erlang/OTP version (${otpSpec0}) ` +
6199 6199 "should not contain 'OTP-'",
@@ -6221,7 +6221,7 @@ async function getElixirVersion(exSpec0, otpVersion) {
6221 6221
6222 6222 const exSpec = exSpec0.match(/^v?(.+)(-otp-.+)/) || exSpec0.match(/^v?(.+)/)
6223 6223 let elixirVersion
6224 if (exSpec[2]) {
6224 + if (exSpec[2] && !isStrictVersion()) {
6225 6225 throw new Error(
6226 6226 `Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) ` +
6227 6227 "should not contain '-otp-...'",
@@ -6387,13 +6387,14 @@ async function getRebar3Versions() {
6387 6387 return rebar3VersionsListing
6388 6388 }
6389 6389
6390 +function isStrictVersion() {
6391 + return core.getInput('version-type', { required: false }) === 'strict'
6392 +}
6393 +
6390 6394 function getVersionFromSpec(spec, versions) {
6391 6395 let version = null
6392 6396
6393 if (
6394 spec.match(/rc/) ||
6395 core.getInput('version-type', { required: false }) === 'strict'
6396 ) {
6397 + if (spec.match(/rc/) || isStrictVersion()) {
6397 6398 version = spec
6398 6399 }
6399 6400
modified src/setup-beam.js
+7 −6
@@ -141,7 +141,7 @@ async function getOTPVersion(otpSpec0, osVersion) {
141 141 const otpVersions = await getOTPVersions(osVersion)
142 142 const otpSpec = otpSpec0.match(/^(OTP-)?([^ ]+)/)
143 143 let otpVersion
144 if (otpSpec[1]) {
144 + if (otpSpec[1] && !isStrictVersion()) {
145 145 throw new Error(
146 146 `Requested Erlang/OTP version (${otpSpec0}) ` +
147 147 "should not contain 'OTP-'",
@@ -169,7 +169,7 @@ async function getElixirVersion(exSpec0, otpVersion) {
169 169
170 170 const exSpec = exSpec0.match(/^v?(.+)(-otp-.+)/) || exSpec0.match(/^v?(.+)/)
171 171 let elixirVersion
172 if (exSpec[2]) {
172 + if (exSpec[2] && !isStrictVersion()) {
173 173 throw new Error(
174 174 `Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) ` +
175 175 "should not contain '-otp-...'",
@@ -335,13 +335,14 @@ async function getRebar3Versions() {
335 335 return rebar3VersionsListing
336 336 }
337 337
338 +function isStrictVersion() {
339 + return core.getInput('version-type', { required: false }) === 'strict'
340 +}
341 +
338 342 function getVersionFromSpec(spec, versions) {
339 343 let version = null
340 344
341 if (
342 spec.match(/rc/) ||
343 core.getInput('version-type', { required: false }) === 'strict'
344 ) {
345 + if (spec.match(/rc/) || isStrictVersion()) {
345 346 version = spec
346 347 }
347 348

Parents: b8427d3