@@ -66,7 +66,7 @@ if "%otp_version%" == "" (
66
66
)
67
67
68
68
if " !otp_version! " == " latest" (
69
- set " url = https://github.com/erlef/otp_builds /releases/latest"
69
+ set " url = https://github.com/erlang/otp /releases/latest"
70
70
for /f " tokens=2 delims= " %%a in ('curl -fsS --head " !url! " ^ | findstr /I " ^location:" ') do set url = %%a
71
71
set " otp_version = !url:*releases/tag/OTP- =! "
72
72
)
@@ -79,12 +79,21 @@ if "!elixir_version!" == "latest" (
79
79
80
80
for /f " tokens=1 delims=." %%A in (" !otp_version! " ) do set " elixir_otp_release = %%A "
81
81
for /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" (
83
86
if %elixir_otp_release% GEQ 26 set " elixir_otp_release = 26"
84
87
) else if " %elixir_major_minor% " == " 1.16" (
85
88
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"
88
97
)
89
98
90
99
set " root_dir = %USERPROFILE% \.elixir-install"
@@ -161,7 +170,15 @@ exit /b 0
161
170
goto :eof
162
171
163
172
: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
+ )
165
182
166
183
if " %force% " == " true" (
167
184
if exist " %elixir_dir% " (
@@ -170,7 +187,7 @@ if "%force%" == "true" (
170
187
)
171
188
172
189
if 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"
174
191
echo downloading !elixir_url! ...
175
192
curl.exe -fsSLo " %tmp_dir% \%elixir_zip% " " !elixir_url! " || exit /b 1
176
193
0 commit comments