mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-30 03:30:48 +00:00
Rename to setup-beam (#21)
This commit is contained in:
+2
-2
@@ -5,6 +5,6 @@ set -eo pipefail
|
||||
cd $RUNNER_TEMP
|
||||
|
||||
wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip
|
||||
unzip -d .setup-elixir/elixir ${1}${2}.zip
|
||||
unzip -d .setup-beam/elixir ${1}${2}.zip
|
||||
rm ${1}${2}.zip
|
||||
echo "$(pwd)/.setup-elixir/elixir/bin" >> $GITHUB_PATH
|
||||
echo "$(pwd)/.setup-beam/elixir/bin" >> $GITHUB_PATH
|
||||
|
||||
+4
-4
@@ -5,8 +5,8 @@ set -eo pipefail
|
||||
cd $RUNNER_TEMP
|
||||
|
||||
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/${2}/${1}.tar.gz
|
||||
mkdir -p .setup-elixir/otp
|
||||
tar zxf otp.tar.gz -C .setup-elixir/otp --strip-components=1
|
||||
mkdir -p .setup-beam/otp
|
||||
tar zxf otp.tar.gz -C .setup-beam/otp --strip-components=1
|
||||
rm otp.tar.gz
|
||||
.setup-elixir/otp/Install -minimal $(pwd)/.setup-elixir/otp
|
||||
echo "$(pwd)/.setup-elixir/otp/bin" >> $GITHUB_PATH
|
||||
.setup-beam/otp/Install -minimal $(pwd)/.setup-beam/otp
|
||||
echo "$(pwd)/.setup-beam/otp/bin" >> $GITHUB_PATH
|
||||
|
||||
+1
-1
@@ -28,5 +28,5 @@ async function installOTP(version, osVersion) {
|
||||
return
|
||||
}
|
||||
|
||||
throw new Error('@erlef/setup-elixir only supports Ubuntu Linux at this time')
|
||||
throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ async function main() {
|
||||
await installElixir(elixirVersion, otpMajor)
|
||||
console.log(`##[endgroup]`)
|
||||
|
||||
process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-elixir/elixir/bin:${process.env.RUNNER_TEMP}/.setup-elixir/otp/bin:${process.env.PATH}`
|
||||
process.env.PATH = `${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin:${process.env.RUNNER_TEMP}/.setup-beam/otp/bin:${process.env.PATH}`
|
||||
|
||||
if (installRebar === 'true') await exec('mix local.rebar --force')
|
||||
if (installHex === 'true') await exec('mix local.hex --force')
|
||||
@@ -53,9 +53,7 @@ async function main() {
|
||||
|
||||
function checkPlatform() {
|
||||
if (process.platform !== 'linux')
|
||||
throw new Error(
|
||||
'@erlef/setup-elixir only supports Ubuntu Linux at this time'
|
||||
)
|
||||
throw new Error('@erlef/setup-beam only supports Ubuntu Linux at this time')
|
||||
}
|
||||
|
||||
async function getOtpVersion(spec, osVersion) {
|
||||
Reference in New Issue
Block a user