File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # calling a script to list all elixir releases
4+ # reject releases before 1.0.0 (starting with 0)
5+ # reject main and master branches
6+ # reject releases with otp version
7+ # reject release candidates
8+ # reject empty line
9+ # finally take last one
10+ ASDF_ELIXIR_LATEST_VERSION=$( ./list-all | grep -Pv " ^0|^main|^master|otp|rc|^$" | tail -n 1)
11+
12+ # gets current erlang version without headers
13+ # changes spaces to new line
14+ # takes second line (Name Version Source Installed)
15+ ASDF_ELIXIR_LATEST_OTP=$( asdf current --no-header erlang | tr -s " " " \n" | sed -n 2p)
16+
17+ # Note: asdf latest does not allows latest stable version to start with number
18+ # therefore installing from source by git ref is not supported, see:
19+ # https://github.com/asdf-vm/asdf/blob/v0.16.5/internal/versions/versions.go#L276
20+ echo " $ASDF_ELIXIR_LATEST_VERSION -otp-$ASDF_ELIXIR_LATEST_OTP "
You can’t perform that action at this time.
0 commit comments