@@ -66,7 +66,7 @@ if "%otp_version%" == "" (
6666)
6767
6868if " !otp_version! " == " latest" (
69- set " url = https://github.com/erlef/otp_builds /releases/latest"
69+ set " url = https://github.com/erlang/otp /releases/latest"
7070 for /f " tokens=2 delims= " %%a in ('curl -fsS --head " !url! " ^ | findstr /I " ^location:" ') do set url = %%a
7171 set " otp_version = !url:*releases/tag/OTP- =! "
7272)
@@ -79,12 +79,21 @@ if "!elixir_version!" == "latest" (
7979
8080for /f " tokens=1 delims=." %%A in (" !otp_version! " ) do set " elixir_otp_release = %%A "
8181for /f " tokens=1,2 delims=." %%A in (" !elixir_version! " ) do set " elixir_major_minor = %%A .%%B "
82- if " %elixir_major_minor% " == " 1.15" (
82+
83+ if " %elixir_major_minor% " == " 1.14" (
84+ if %elixir_otp_release% GEQ 25 set " elixir_otp_release = 25"
85+ ) else if " %elixir_major_minor% " == " 1.15" (
8386 if %elixir_otp_release% GEQ 26 set " elixir_otp_release = 26"
8487) else if " %elixir_major_minor% " == " 1.16" (
8588 if %elixir_otp_release% GEQ 26 set " elixir_otp_release = 26"
86- ) else if " %elixir_major_minor% " == " 1.14" (
87- if %elixir_otp_release% GEQ 25 set " elixir_otp_release = 25"
89+ ) else if " %elixir_major_minor% " == " 1.17" (
90+ if %elixir_otp_release% GEQ 27 set " elixir_otp_release = 27"
91+ ) else if " %elixir_major_minor% " == " 1.18" (
92+ if %elixir_otp_release% GEQ 27 set " elixir_otp_release = 27"
93+ ) else if " %elixir_major_minor% " == " 1.19" (
94+ if %elixir_otp_release% GEQ 28 set " elixir_otp_release = 28"
95+ ) else (
96+ if %elixir_otp_release% GEQ 28 set " elixir_otp_release = 28"
8897)
8998
9099set " root_dir = %USERPROFILE% \.elixir-install"
@@ -161,7 +170,15 @@ exit /b 0
161170goto :eof
162171
163172:install_elixir
164- set " elixir_zip = elixir-!elixir_version! -otp-!elixir_otp_release! .zip"
173+ set " elixir_zip = elixir-otp-!elixir_otp_release! .zip"
174+
175+ if " %elixir_version% " == " main" (
176+ rem Do not remove this comment
177+ set " ref = main-latest"
178+ ) else (
179+ rem Do not remove this comment
180+ set " ref = v%elixir_version% "
181+ )
165182
166183if " %force% " == " true" (
167184 if exist " %elixir_dir% " (
@@ -170,7 +187,7 @@ if "%force%" == "true" (
170187)
171188
172189if not exist " %elixir_dir% \bin" (
173- set " elixir_url = https://github.com/elixir-lang/elixir/releases/download/v !elixir_version! /elixir-otp-%elixir_otp_release% .zip"
190+ set " elixir_url = https://github.com/elixir-lang/elixir/releases/download/%ref% /elixir-otp-%elixir_otp_release% .zip"
174191 echo downloading !elixir_url! ...
175192 curl.exe -fsSLo " %tmp_dir% \%elixir_zip% " " !elixir_url! " || exit /b 1
176193
0 commit comments