You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently asdf latest --all using a fallback call returns main-otp-25 which we definitely can't consider as stable. However we can easily add a one line script using code like:
echo$(curl --silent https://api.github.com/repos/elixir-lang/elixir/releases/latest | jq -r .name)-otp-$(asdf current erlang | sed -r "s/^erlang\s+([0-9]+).*$/\1/")# orecho$(asdf list-all elixir | grep -Pv "^0|rc|otp|main|master"| tail -n 1)-otp-$(asdf current erlang | sed -r "s/^erlang\s+([0-9]+).*$/\1/"# 1.14.1-otp-25
The first part simply fetches latest release name using Github API, curl and jq. The second is even simpler as it uses only asdf current and sed. Alternatively in first part the second example uses only asdf and grep.
Also we can use Github API, curl, jq and sed to fetch latest Erlang version like:
Currently
asdf latest --all
using a fallback call returnsmain-otp-25
which we definitely can't consider as stable. However we can easily add a one line script using code like:The first part simply fetches latest release name using
Github API
,curl
andjq
. The second is even simpler as it uses onlyasdf current
andsed
. Alternatively in first part the second example uses onlyasdf
andgrep
.Also we can use
Github API
,curl
,jq
andsed
to fetch latestErlang
version like:in case we to protect script in case
erlang
plugin is not installedNote: Those code sample are the first ones coming to my mind and most probably there are even more simple ones.
The text was updated successfully, but these errors were encountered: