mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
d8a37f5aac
* Support more OTP+Windows versions (try to bridge the gap with gleam-lang/setup-erlang that seems to support pre-21 versions) * Merge ci.yml and test.yml * Add Elixir to the Windows mix * Hopefully improve error/warning messages * Adapt the doc.s to the current reality * Add option version-type (loose by default, for compatibility)
20 lines
653 B
PowerShell
20 lines
653 B
PowerShell
param([Parameter(Mandatory=$true)][string]$VSN)
|
|
|
|
$ErrorActionPreference="Stop"
|
|
|
|
Set-Location $Env:RUNNER_TEMP
|
|
|
|
$FILE_INPUT="${VSN}.zip"
|
|
$FILE_OUTPUT="elixir.zip"
|
|
$DIR_FOR_BIN=".setup-beam/elixir"
|
|
|
|
$ProgressPreference="SilentlyContinue"
|
|
Invoke-WebRequest "https://repo.hex.pm/builds/elixir/${FILE_INPUT}" -OutFile "$FILE_OUTPUT"
|
|
$ProgressPreference="Continue"
|
|
New-Item "$DIR_FOR_BIN" -ItemType Directory | Out-Null
|
|
$ProgressPreference="SilentlyContinue"
|
|
Expand-Archive -DestinationPath "${DIR_FOR_BIN}" -Path "${FILE_OUTPUT}"
|
|
$ProgressPreference="Continue"
|
|
Write-Output "Installed Erlang/OTP version follows"
|
|
& "$DIR_FOR_BIN/bin/iex" "-v" | Write-Output
|