Compare commits

...

2 Commits

Author SHA1 Message Date
Paulo F. Oliveira 11d59b146c Allow for latest 100 rebar3 versions when fetching from GitHub (#42) 2021-05-27 20:28:05 -05:00
Wojtek Mach e332dc64ad Change how we print installed Elixir version (#36) 2021-05-26 13:29:59 +02:00
5 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -20,13 +20,13 @@ jobs:
node-version: '12'
- run: npm install -g npm
- run: npm install
- run: npm run format
- run: npm run build
- run: npm install -g markdownlint-cli
- run: npm run markdownlint
- run: npm run shellcheck
- run: npm run yamllint
- run: npm run jslint
- run: npm run licenses
- run: npm run build
- run: npm run format
- name: Check if build left artifacts
run: git diff --exit-code
+1 -1
View File
@@ -56,7 +56,7 @@ jobs:
os: 'ubuntu-16.04'
- elixir-version: 'v1.4'
otp-version: '20'
rebar3-version: '3.11'
rebar3-version: '3.6.0'
os: 'ubuntu-18.04'
- elixir-version: 'v1.4'
otp-version: '20'
+6 -6
View File
@@ -154,18 +154,18 @@ async function testRebar3Versions() {
let expected
let spec
spec = '3.13.x'
expected = '3.13.2'
spec = '3.10.x'
expected = '3.10.0'
got = await setupElixir.getRebar3Version(spec)
assert.deepStrictEqual(got, expected)
spec = '3.13.2'
expected = '3.13.2'
spec = '3.10.0'
expected = '3.10.0'
got = await setupElixir.getRebar3Version(spec)
assert.deepStrictEqual(got, expected)
spec = '3.13'
expected = '3.13.2'
spec = '3.10'
expected = '3.10.0'
got = await setupElixir.getRebar3Version(spec)
assert.deepStrictEqual(got, expected)
}
+5 -3
View File
@@ -4780,11 +4780,13 @@ async function getElixirVersion(exSpec0, otpVersion) {
if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) {
// ... and it's available: use it!
elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}`
core.info(`Using Elixir / -otp- version ${elixirVersionWithOTP}`)
core.info(
`Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`,
)
} else {
// ... and it's not available: fallback to the "generic" version (v1.4.5 only).
elixirVersionWithOTP = elixirVersion
core.info(`Using Elixir ${elixirVersionWithOTP}`)
core.info(`Using Elixir ${elixirVersion}`)
}
} else {
throw new Error(
@@ -4857,7 +4859,7 @@ async function getElixirVersions() {
async function getRebar3Versions() {
const resultJSON = await get(
'https://api.github.com/repos/erlang/rebar3/releases',
'https://api.github.com/repos/erlang/rebar3/releases?per_page=100',
)
const rebar3VersionsListing = JSON.parse(resultJSON)
.map((x) => x.tag_name)
+5 -3
View File
@@ -144,11 +144,13 @@ async function getElixirVersion(exSpec0, otpVersion) {
if (elixirVersions.get(elixirVersion).includes(otpMatch[1])) {
// ... and it's available: use it!
elixirVersionWithOTP = `${elixirVersion}-otp-${otpVersionMajor}`
core.info(`Using Elixir / -otp- version ${elixirVersionWithOTP}`)
core.info(
`Using Elixir ${elixirVersion} (built for OTP ${otpVersionMajor})`,
)
} else {
// ... and it's not available: fallback to the "generic" version (v1.4.5 only).
elixirVersionWithOTP = elixirVersion
core.info(`Using Elixir ${elixirVersionWithOTP}`)
core.info(`Using Elixir ${elixirVersion}`)
}
} else {
throw new Error(
@@ -221,7 +223,7 @@ async function getElixirVersions() {
async function getRebar3Versions() {
const resultJSON = await get(
'https://api.github.com/repos/erlang/rebar3/releases',
'https://api.github.com/repos/erlang/rebar3/releases?per_page=100',
)
const rebar3VersionsListing = JSON.parse(resultJSON)
.map((x) => x.tag_name)