mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-30 19:50:49 +00:00
Improve on "Add Windows to the mix" (#52)
* 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)
This commit is contained in:
Vendored
+4
-3
@@ -7,13 +7,14 @@ Set-Location $Env:RUNNER_TEMP
|
||||
$FILE_OUTPUT="otp.exe"
|
||||
$DIR_FOR_BIN=".setup-beam/otp"
|
||||
|
||||
Remove-Item -Recurse -Force "$DIR_FOR_BIN" -ErrorAction SilentlyContinue
|
||||
$ProgressPreference="SilentlyContinue"
|
||||
Invoke-WebRequest "https://github.com/erlang/otp/releases/download/OTP-$VSN/otp_win64_$VSN.exe" -OutFile "$FILE_OUTPUT"
|
||||
$ProgressPreference="Continue"
|
||||
New-Item "$DIR_FOR_BIN" -ItemType Directory | Out-Null
|
||||
Move-Item "$FILE_OUTPUT" "$DIR_FOR_BIN"
|
||||
Start-Process "./$DIR_FOR_BIN/$FILE_OUTPUT" /S -Wait
|
||||
Write-Output "C:/Program Files/erl-$VSN/bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
|
||||
$ErlExec = Get-ChildItem -Path "C:/Program Files/" -Recurse -Depth 2 -Filter 'erl.exe' -Name | ForEach-Object { Write-Output "C:/Program Files/$_" }
|
||||
$ErlPath = Split-Path -Path "$ErlExec"
|
||||
Write-Output "$ErlPath" | Out-File -FilePath otp_path.txt -Encoding utf8 -NoNewline
|
||||
Write-Output "Installed Erlang/OTP version follows"
|
||||
& "C:/Program Files/erl-$VSN/bin/erl.exe" "+V" | Write-Output
|
||||
& "$ErlPath/erl.exe" "+V" | Write-Output
|
||||
|
||||
Reference in New Issue
Block a user