mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69fb25ba7e | |||
| caa49b0658 | |||
| ae1b3f83c0 | |||
| 79c4ce944c | |||
| a7fc45fd2d | |||
| ac7b7d515b | |||
| b8427d3a11 | |||
| c9256cba97 | |||
| 9627051904 | |||
| cb4115cacb | |||
| 1bf5800962 | |||
| 311afd9034 | |||
| 9d4fdad6a1 | |||
| 10d50f7062 | |||
| 42313cae10 | |||
| 46b0c79322 | |||
| 5436ca9587 | |||
| 01cb298fa5 | |||
| 2e0500f2a5 | |||
| 3e684c4e0b | |||
| 380359b6cf | |||
| 73feb48b6c |
@@ -27,7 +27,6 @@ jobs:
|
||||
- run: npm run shellcheck
|
||||
- run: npm run yamllint
|
||||
- run: npm run jslint
|
||||
- run: npm run licenses
|
||||
- name: Check if build left artifacts
|
||||
run: git diff --exit-code
|
||||
|
||||
|
||||
@@ -21,7 +21,25 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
combo:
|
||||
- otp-version: '25.0-rc1'
|
||||
- otp-version: '25'
|
||||
elixir-version: '1'
|
||||
rebar3-version: '3'
|
||||
os: 'ubuntu-22.04'
|
||||
- otp-version: '24'
|
||||
elixir-version: '1'
|
||||
rebar3-version: '3'
|
||||
os: 'ubuntu-22.04'
|
||||
- otp-version: '25.0'
|
||||
elixir-version: 'v1.13.4-otp-25'
|
||||
rebar3-version: '3.18.0'
|
||||
os: 'ubuntu-latest'
|
||||
version-type: 'strict'
|
||||
- otp-version: '25.0'
|
||||
elixir-version: 'v1.13.4'
|
||||
rebar3-version: '3.18.0'
|
||||
os: 'ubuntu-latest'
|
||||
version-type: 'strict'
|
||||
- otp-version: '25'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'ubuntu-latest'
|
||||
- otp-version: '24'
|
||||
@@ -65,6 +83,10 @@ jobs:
|
||||
otp-version: '23'
|
||||
rebar3-version: '3.14'
|
||||
os: 'ubuntu-18.04'
|
||||
- elixir-version: 'v1.13.4'
|
||||
otp-version: '25.0.2'
|
||||
rebar3-version: '3.19'
|
||||
os: 'ubuntu-18.04'
|
||||
- elixir-version: 'v1.10'
|
||||
otp-version: '23'
|
||||
rebar3-version: '3.14'
|
||||
@@ -73,6 +95,10 @@ jobs:
|
||||
otp-version: '24'
|
||||
rebar3-version: '3.15'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'v1.13.4'
|
||||
otp-version: '25.0.2'
|
||||
rebar3-version: '3.19'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'v1.11.0'
|
||||
otp-version: '22.3.4.2'
|
||||
os: 'ubuntu-20.04'
|
||||
@@ -87,6 +113,9 @@ jobs:
|
||||
- elixir-version: 'master'
|
||||
otp-version: '23.1'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'master'
|
||||
otp-version: '25'
|
||||
os: 'ubuntu-20.04'
|
||||
- gleam-version: '0.16'
|
||||
otp-version: '24'
|
||||
rebar3-version: '3.16'
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
combo:
|
||||
- otp-version: '25.0-rc1'
|
||||
- otp-version: '25'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'windows-latest'
|
||||
- otp-version: '24.0.2'
|
||||
|
||||
+6106
-786
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,7 @@ Here are a few things you can do that will increase the likelihood of your pull
|
||||
- Write tests.
|
||||
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
||||
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
||||
- Execute `npm run build-dist` and fix any issues arising from that
|
||||
|
||||
## Resources
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ workflow by:
|
||||
- optionally, installing [`hex`](https://hex.pm/)
|
||||
- optionally, having
|
||||
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) show
|
||||
warnings and errors on pull requestsotp-version: false)
|
||||
warnings and errors on pull requests
|
||||
|
||||
**Note**: currently, this action only supports Actions' `ubuntu-` and `windows-` runtimes.
|
||||
|
||||
@@ -49,10 +49,11 @@ and Erlang/OTP.
|
||||
|
||||
| Operating system | Erlang/OTP | Status
|
||||
|- |- |-
|
||||
| ubuntu-18.04 | 17 - 24 | ✅
|
||||
| ubuntu-20.04 | 20 - 24 | ✅
|
||||
| windows-2019 | 21* - 24 | ✅
|
||||
| windows-2022 | 21* - 24 | ✅
|
||||
| ubuntu-18.04 | 17 - 25 | ✅
|
||||
| ubuntu-20.04 | 20 - 25 | ✅
|
||||
| ubuntu-22.04 | 24.2 - 25 | ✅
|
||||
| windows-2019 | 21* - 25 | ✅
|
||||
| windows-2022 | 21* - 25 | ✅
|
||||
|
||||
**Note** *: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc.
|
||||
|
||||
@@ -65,6 +66,7 @@ uses that to download assets:
|
||||
|- |-
|
||||
| ubuntu18 | ubuntu-18.04
|
||||
| ubuntu20 | ubuntu-20.04
|
||||
| ubuntu22 | ubuntu-22.04
|
||||
| win19 | windows-2019
|
||||
| win22 | windows-2022
|
||||
|
||||
@@ -192,9 +194,9 @@ jobs:
|
||||
Base installation folders (useful for e.g. fetching headers for NIFs) are available in the following
|
||||
environment variables:
|
||||
|
||||
- `INSTALL_DIR_FOR_ELIXIR`: base folder for Erlang/OTP
|
||||
- `INSTALL_DIR_FOR_GLEAM`: base folder for Elixir
|
||||
- `INSTALL_DIR_FOR_OTP`: base folder for Gleam
|
||||
- `INSTALL_DIR_FOR_OTP`: base folder for Erlang/OTP
|
||||
- `INSTALL_DIR_FOR_ELIXIR`: base folder for Elixir
|
||||
- `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam
|
||||
- `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3`
|
||||
|
||||
## Elixir Problem Matchers
|
||||
|
||||
+1
-1
@@ -43,5 +43,5 @@ outputs:
|
||||
rebar3-version:
|
||||
description: Exact version of rebar3 that was installed
|
||||
runs:
|
||||
using: node12
|
||||
using: node16
|
||||
main: dist/index.js
|
||||
|
||||
Vendored
+929
-846
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
@@ -11,7 +11,7 @@ DIR_FOR_BIN=.setup-beam/elixir
|
||||
|
||||
wget -q -O "${FILE_OUTPUT}" "https://repo.hex.pm/builds/elixir/${FILE_INPUT}"
|
||||
mkdir -p "${DIR_FOR_BIN}"
|
||||
unzip -q -d "${DIR_FOR_BIN}" "${FILE_OUTPUT}"
|
||||
unzip -q -o -d "${DIR_FOR_BIN}" "${FILE_OUTPUT}"
|
||||
echo "Installed Elixir version follows"
|
||||
${DIR_FOR_BIN}/bin/elixir -v
|
||||
|
||||
|
||||
Vendored
-141
@@ -1,141 +0,0 @@
|
||||
@actions/core
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/exec
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/http-client
|
||||
MIT
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@actions/io
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
lru-cache
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
semver
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
yallist
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
Generated
+1062
-1056
File diff suppressed because it is too large
Load Diff
+16
-15
@@ -3,14 +3,15 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ncc build src/setup-beam.js --no-cache --license licenses.txt",
|
||||
"build": "ncc build src/setup-beam.js --no-cache",
|
||||
"format": "prettier src/**/*.js --write && prettier __tests__/**/*.js --write",
|
||||
"jslint": "eslint src/**/*.js && eslint __tests__/**/*.js",
|
||||
"licenses": "yarn licenses generate-disclaimer > 3RD_PARTY_LICENSES",
|
||||
"markdownlint": "markdownlint *.md",
|
||||
"shellcheck": "shellcheck src/install-*.sh .github/workflows/*.sh",
|
||||
"test": "node __tests__/setup-beam.test.js && node ./__tests__/problem-matchers.test.js",
|
||||
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml"
|
||||
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml",
|
||||
"build-dist": "npm install && npm run build && npm run format && npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@@ -19,24 +20,24 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "1.6.0",
|
||||
"@actions/exec": "1.1.0",
|
||||
"semver": "7.3.5"
|
||||
"@actions/exec": "1.1.1",
|
||||
"semver": "7.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "0.33.1",
|
||||
"eslint": "8.6.0",
|
||||
"eslint-config-airbnb": "v19.0.4",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"@vercel/ncc": "0.33.4",
|
||||
"eslint": "8.14.0",
|
||||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "6.5.1",
|
||||
"eslint-plugin-react": "7.29.0",
|
||||
"husky": "7.0.4",
|
||||
"markdownlint": "0.25.0",
|
||||
"prettier": "2.5.1",
|
||||
"markdownlint": "0.25.1",
|
||||
"prettier": "2.6.2",
|
||||
"shellcheck": "1.1.0",
|
||||
"yaml-lint": "1.2.4",
|
||||
"yarn": "1.22.17"
|
||||
"yaml-lint": "1.3.0",
|
||||
"yarn": "1.22.18"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ DIR_FOR_BIN=.setup-beam/elixir
|
||||
|
||||
wget -q -O "${FILE_OUTPUT}" "https://repo.hex.pm/builds/elixir/${FILE_INPUT}"
|
||||
mkdir -p "${DIR_FOR_BIN}"
|
||||
unzip -q -d "${DIR_FOR_BIN}" "${FILE_OUTPUT}"
|
||||
unzip -q -o -d "${DIR_FOR_BIN}" "${FILE_OUTPUT}"
|
||||
echo "Installed Elixir version follows"
|
||||
${DIR_FOR_BIN}/bin/elixir -v
|
||||
|
||||
|
||||
+18
-14
@@ -73,7 +73,7 @@ async function maybeInstallElixir(elixirSpec, otpVersion) {
|
||||
const disableProblemMatchers = core.getInput('disable_problem_matchers', {
|
||||
required: false,
|
||||
})
|
||||
if (!disableProblemMatchers) {
|
||||
if (disableProblemMatchers === 'false') {
|
||||
const matchersPath = path.join(__dirname, '..', '.github')
|
||||
console.log(
|
||||
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
|
||||
@@ -89,7 +89,7 @@ async function maybeInstallElixir(elixirSpec, otpVersion) {
|
||||
}
|
||||
|
||||
async function mix(shouldMix, what) {
|
||||
if (shouldMix) {
|
||||
if (shouldMix === 'true') {
|
||||
const cmd = 'mix'
|
||||
const args = [`local.${what}`, '--force']
|
||||
console.log(`##[group]Running ${cmd} ${args}`)
|
||||
@@ -139,12 +139,12 @@ async function maybeInstallRebar3(rebar3Spec) {
|
||||
|
||||
async function getOTPVersion(otpSpec0, osVersion) {
|
||||
const otpVersions = await getOTPVersions(osVersion)
|
||||
const otpSpec = otpSpec0.match(/^(OTP-)?([^ ]+)/)
|
||||
const otpSpec = otpSpec0.match(/^(OTP-|maint-)?([^ ]+)/)
|
||||
let otpVersion
|
||||
if (otpSpec[1]) {
|
||||
if (otpSpec[1] && !isStrictVersion()) {
|
||||
throw new Error(
|
||||
`Requested Erlang/OTP version (${otpSpec0}) ` +
|
||||
"should not contain 'OTP-'",
|
||||
"should not contain 'OTP-, or maint-'",
|
||||
)
|
||||
}
|
||||
if (otpSpec) {
|
||||
@@ -169,7 +169,7 @@ async function getElixirVersion(exSpec0, otpVersion) {
|
||||
|
||||
const exSpec = exSpec0.match(/^v?(.+)(-otp-.+)/) || exSpec0.match(/^v?(.+)/)
|
||||
let elixirVersion
|
||||
if (exSpec[2]) {
|
||||
if (exSpec[2] && !isStrictVersion()) {
|
||||
throw new Error(
|
||||
`Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) ` +
|
||||
"should not contain '-otp-...'",
|
||||
@@ -258,7 +258,7 @@ async function getOTPVersions(osVersion) {
|
||||
.trim()
|
||||
.split('\n')
|
||||
.forEach((line) => {
|
||||
const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
|
||||
const otpMatch = line.match(/^(OTP-|maint-)?([^ ]+)/)
|
||||
const otpVersion = otpMatch[2]
|
||||
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
|
||||
})
|
||||
@@ -335,13 +335,14 @@ async function getRebar3Versions() {
|
||||
return rebar3VersionsListing
|
||||
}
|
||||
|
||||
function isStrictVersion() {
|
||||
return core.getInput('version-type', { required: false }) === 'strict'
|
||||
}
|
||||
|
||||
function getVersionFromSpec(spec, versions) {
|
||||
let version = null
|
||||
|
||||
if (
|
||||
spec.match(/rc/) ||
|
||||
core.getInput('version-type', { required: false }) === 'strict'
|
||||
) {
|
||||
if (spec.match(/rc/) || isStrictVersion()) {
|
||||
version = spec
|
||||
}
|
||||
|
||||
@@ -404,6 +405,7 @@ function getRunnerOSVersion() {
|
||||
const ImageOSToContainer = {
|
||||
ubuntu18: 'ubuntu-18.04',
|
||||
ubuntu20: 'ubuntu-20.04',
|
||||
ubuntu22: 'ubuntu-22.04',
|
||||
win19: 'windows-2019',
|
||||
win22: 'windows-2022',
|
||||
}
|
||||
@@ -471,9 +473,11 @@ async function get(url0, pageIdxs) {
|
||||
|
||||
function maybePrependWithV(versionToPrepend, specVersion) {
|
||||
const digitStart = /^\d+/
|
||||
return digitStart.test(specVersion)
|
||||
? `v${versionToPrepend}`
|
||||
: versionToPrepend
|
||||
let v = versionToPrepend
|
||||
if (digitStart.test(specVersion)) {
|
||||
v = `v${versionToPrepend}`
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user