mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
Allow using rebar3 nightly builds (#84)
This commit is contained in:
committed by
GitHub
parent
e6ab31075d
commit
c71c5c91bb
@@ -21,6 +21,9 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
combo:
|
combo:
|
||||||
|
- otp-version: '24'
|
||||||
|
rebar3-version: 'nightly'
|
||||||
|
os: 'ubuntu-latest'
|
||||||
- elixir-version: 'v1.0'
|
- elixir-version: 'v1.0'
|
||||||
otp-version: '17'
|
otp-version: '17'
|
||||||
os: 'ubuntu-16.04'
|
os: 'ubuntu-16.04'
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ jobs:
|
|||||||
- otp-version: '24.0.2'
|
- otp-version: '24.0.2'
|
||||||
rebar3-version: '3.16'
|
rebar3-version: '3.16'
|
||||||
os: 'windows-2019'
|
os: 'windows-2019'
|
||||||
|
- otp-version: '24.0.2'
|
||||||
|
rebar3-version: 'nightly'
|
||||||
|
os: 'windows-2019'
|
||||||
- otp-version: '23.0'
|
- otp-version: '23.0'
|
||||||
rebar3-version: '3.15'
|
rebar3-version: '3.15'
|
||||||
os: 'windows-2019'
|
os: 'windows-2019'
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ workflow by:
|
|||||||
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) show
|
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) show
|
||||||
warnings and errors on pull requests
|
warnings and errors on pull requests
|
||||||
|
|
||||||
**Note** Currently, this action only supports Actions' `ubuntu-` and `windows-` runtimes.
|
**Note**: currently, this action only supports Actions' `ubuntu-` and `windows-` runtimes.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
See [action.yml](action.yml) for the action's specification.
|
See [action.yml](action.yml) for the action's specification.
|
||||||
|
|
||||||
**Note**: The Erlang/OTP release version specification is [relatively
|
**Note**: the Erlang/OTP release version specification is [relatively
|
||||||
complex](http://erlang.org/doc/system_principles/versions.html#version-scheme).
|
complex](http://erlang.org/doc/system_principles/versions.html#version-scheme).
|
||||||
For best results, we recommend specifying exact
|
For best results, we recommend specifying exact
|
||||||
versions, and setting option `version-type` to `strict`.
|
versions, and setting option `version-type` to `strict`.
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ inputs:
|
|||||||
description: Whether to install Rebar (with Mix)
|
description: Whether to install Rebar (with Mix)
|
||||||
default: true
|
default: true
|
||||||
rebar3-version:
|
rebar3-version:
|
||||||
description: Version range or exact version of rebar3 to use
|
description: Version range or exact version of rebar3 to use (or nightly)
|
||||||
version-type:
|
version-type:
|
||||||
description: strict means the versions are take as-are; loose means we try
|
description: strict means the versions are take as-are; loose means we try
|
||||||
to guess versions based on semver rules
|
to guess versions based on semver rules
|
||||||
|
|||||||
Vendored
+6
-1
@@ -4785,9 +4785,14 @@ async function maybeInstallGleam(gleamSpec) {
|
|||||||
|
|
||||||
async function maybeInstallRebar3(rebar3Spec) {
|
async function maybeInstallRebar3(rebar3Spec) {
|
||||||
let installed = false
|
let installed = false
|
||||||
|
let rebar3Version
|
||||||
|
|
||||||
if (rebar3Spec) {
|
if (rebar3Spec) {
|
||||||
const rebar3Version = await getRebar3Version(rebar3Spec)
|
if (rebar3Spec === 'nightly') {
|
||||||
|
rebar3Version = 'nightly'
|
||||||
|
} else {
|
||||||
|
rebar3Version = await getRebar3Version(rebar3Spec)
|
||||||
|
}
|
||||||
console.log(`##[group]Installing rebar3 ${rebar3Version}`)
|
console.log(`##[group]Installing rebar3 ${rebar3Version}`)
|
||||||
await installer.installRebar3(rebar3Version)
|
await installer.installRebar3(rebar3Version)
|
||||||
core.setOutput('rebar3-version', rebar3Version)
|
core.setOutput('rebar3-version', rebar3Version)
|
||||||
|
|||||||
Vendored
+9
-2
@@ -10,12 +10,19 @@ $FILE_OUTPUT_PS1="rebar3.ps1"
|
|||||||
$DIR_FOR_BIN=".setup-beam/rebar3"
|
$DIR_FOR_BIN=".setup-beam/rebar3"
|
||||||
|
|
||||||
$ProgressPreference="SilentlyContinue"
|
$ProgressPreference="SilentlyContinue"
|
||||||
Invoke-WebRequest "https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}" -OutFile "$FILE_OUTPUT"
|
$REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
||||||
|
$REBAR3_NIGHTLY=""
|
||||||
|
If ( $VSN -eq "nightly" )
|
||||||
|
{
|
||||||
|
$REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
||||||
|
$REBAR3_NIGHTLY=" (from nightly build)"
|
||||||
|
}
|
||||||
|
Invoke-WebRequest "$REBAR3_TARGET" -OutFile "$FILE_OUTPUT"
|
||||||
$ProgressPreference="Continue"
|
$ProgressPreference="Continue"
|
||||||
New-Item "$DIR_FOR_BIN/bin" -ItemType Directory | Out-Null
|
New-Item "$DIR_FOR_BIN/bin" -ItemType Directory | Out-Null
|
||||||
Move-Item "$FILE_OUTPUT" "$DIR_FOR_BIN/bin"
|
Move-Item "$FILE_OUTPUT" "$DIR_FOR_BIN/bin"
|
||||||
Write-Output "& escript.exe $PWD/$DIR_FOR_BIN/bin/$FILE_OUTPUT `$args" | Out-File -FilePath "$FILE_OUTPUT_PS1" -Encoding utf8 -Append
|
Write-Output "& escript.exe $PWD/$DIR_FOR_BIN/bin/$FILE_OUTPUT `$args" | Out-File -FilePath "$FILE_OUTPUT_PS1" -Encoding utf8 -Append
|
||||||
type $FILE_OUTPUT_PS1
|
type $FILE_OUTPUT_PS1
|
||||||
Move-Item "$FILE_OUTPUT_PS1" "$DIR_FOR_BIN/bin"
|
Move-Item "$FILE_OUTPUT_PS1" "$DIR_FOR_BIN/bin"
|
||||||
Write-Output "Installed rebar3 version follows"
|
Write-Output "Installed rebar3 version$REBAR3_NIGHTLY follows"
|
||||||
& "$DIR_FOR_BIN/bin/rebar3" "version" | Write-Output
|
& "$DIR_FOR_BIN/bin/rebar3" "version" | Write-Output
|
||||||
|
|||||||
Vendored
+8
-2
@@ -9,9 +9,15 @@ FILE_INPUT=rebar3
|
|||||||
FILE_OUTPUT=rebar3
|
FILE_OUTPUT=rebar3
|
||||||
DIR_FOR_BIN=.setup-beam/rebar3
|
DIR_FOR_BIN=.setup-beam/rebar3
|
||||||
|
|
||||||
wget -q -O "${FILE_OUTPUT}" "https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
||||||
|
REBAR3_NIGHTLY=""
|
||||||
|
if [ "${VSN}" == "nightly" ]; then
|
||||||
|
REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
||||||
|
REBAR3_NIGHTLY=" (from nightly build)"
|
||||||
|
fi
|
||||||
|
wget -q -O "${FILE_OUTPUT}" "${REBAR3_TARGET}"
|
||||||
mkdir -p "${DIR_FOR_BIN}/bin"
|
mkdir -p "${DIR_FOR_BIN}/bin"
|
||||||
chmod +x "${FILE_OUTPUT}"
|
chmod +x "${FILE_OUTPUT}"
|
||||||
mv "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
mv "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
||||||
echo "Installed rebar3 version follows"
|
echo "Installed rebar3 version$REBAR3_NIGHTLY follows"
|
||||||
${DIR_FOR_BIN}/bin/rebar3 version
|
${DIR_FOR_BIN}/bin/rebar3 version
|
||||||
|
|||||||
@@ -10,12 +10,19 @@ $FILE_OUTPUT_PS1="rebar3.ps1"
|
|||||||
$DIR_FOR_BIN=".setup-beam/rebar3"
|
$DIR_FOR_BIN=".setup-beam/rebar3"
|
||||||
|
|
||||||
$ProgressPreference="SilentlyContinue"
|
$ProgressPreference="SilentlyContinue"
|
||||||
Invoke-WebRequest "https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}" -OutFile "$FILE_OUTPUT"
|
$REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
||||||
|
$REBAR3_NIGHTLY=""
|
||||||
|
If ( $VSN -eq "nightly" )
|
||||||
|
{
|
||||||
|
$REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
||||||
|
$REBAR3_NIGHTLY=" (from nightly build)"
|
||||||
|
}
|
||||||
|
Invoke-WebRequest "$REBAR3_TARGET" -OutFile "$FILE_OUTPUT"
|
||||||
$ProgressPreference="Continue"
|
$ProgressPreference="Continue"
|
||||||
New-Item "$DIR_FOR_BIN/bin" -ItemType Directory | Out-Null
|
New-Item "$DIR_FOR_BIN/bin" -ItemType Directory | Out-Null
|
||||||
Move-Item "$FILE_OUTPUT" "$DIR_FOR_BIN/bin"
|
Move-Item "$FILE_OUTPUT" "$DIR_FOR_BIN/bin"
|
||||||
Write-Output "& escript.exe $PWD/$DIR_FOR_BIN/bin/$FILE_OUTPUT `$args" | Out-File -FilePath "$FILE_OUTPUT_PS1" -Encoding utf8 -Append
|
Write-Output "& escript.exe $PWD/$DIR_FOR_BIN/bin/$FILE_OUTPUT `$args" | Out-File -FilePath "$FILE_OUTPUT_PS1" -Encoding utf8 -Append
|
||||||
type $FILE_OUTPUT_PS1
|
type $FILE_OUTPUT_PS1
|
||||||
Move-Item "$FILE_OUTPUT_PS1" "$DIR_FOR_BIN/bin"
|
Move-Item "$FILE_OUTPUT_PS1" "$DIR_FOR_BIN/bin"
|
||||||
Write-Output "Installed rebar3 version follows"
|
Write-Output "Installed rebar3 version$REBAR3_NIGHTLY follows"
|
||||||
& "$DIR_FOR_BIN/bin/rebar3" "version" | Write-Output
|
& "$DIR_FOR_BIN/bin/rebar3" "version" | Write-Output
|
||||||
|
|||||||
@@ -9,9 +9,15 @@ FILE_INPUT=rebar3
|
|||||||
FILE_OUTPUT=rebar3
|
FILE_OUTPUT=rebar3
|
||||||
DIR_FOR_BIN=.setup-beam/rebar3
|
DIR_FOR_BIN=.setup-beam/rebar3
|
||||||
|
|
||||||
wget -q -O "${FILE_OUTPUT}" "https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
||||||
|
REBAR3_NIGHTLY=""
|
||||||
|
if [ "${VSN}" == "nightly" ]; then
|
||||||
|
REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
||||||
|
REBAR3_NIGHTLY=" (from nightly build)"
|
||||||
|
fi
|
||||||
|
wget -q -O "${FILE_OUTPUT}" "${REBAR3_TARGET}"
|
||||||
mkdir -p "${DIR_FOR_BIN}/bin"
|
mkdir -p "${DIR_FOR_BIN}/bin"
|
||||||
chmod +x "${FILE_OUTPUT}"
|
chmod +x "${FILE_OUTPUT}"
|
||||||
mv "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
mv "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
||||||
echo "Installed rebar3 version follows"
|
echo "Installed rebar3 version$REBAR3_NIGHTLY follows"
|
||||||
${DIR_FOR_BIN}/bin/rebar3 version
|
${DIR_FOR_BIN}/bin/rebar3 version
|
||||||
|
|||||||
+6
-1
@@ -113,9 +113,14 @@ async function maybeInstallGleam(gleamSpec) {
|
|||||||
|
|
||||||
async function maybeInstallRebar3(rebar3Spec) {
|
async function maybeInstallRebar3(rebar3Spec) {
|
||||||
let installed = false
|
let installed = false
|
||||||
|
let rebar3Version
|
||||||
|
|
||||||
if (rebar3Spec) {
|
if (rebar3Spec) {
|
||||||
const rebar3Version = await getRebar3Version(rebar3Spec)
|
if (rebar3Spec === 'nightly') {
|
||||||
|
rebar3Version = 'nightly'
|
||||||
|
} else {
|
||||||
|
rebar3Version = await getRebar3Version(rebar3Spec)
|
||||||
|
}
|
||||||
console.log(`##[group]Installing rebar3 ${rebar3Version}`)
|
console.log(`##[group]Installing rebar3 ${rebar3Version}`)
|
||||||
await installer.installRebar3(rebar3Version)
|
await installer.installRebar3(rebar3Version)
|
||||||
core.setOutput('rebar3-version', rebar3Version)
|
core.setOutput('rebar3-version', rebar3Version)
|
||||||
|
|||||||
Reference in New Issue
Block a user