Files
setup-elixir/script/build-versions
Jonathan Clem 83d6ee76a6 Initial commit
2019-08-28 16:49:59 -04:00

19 lines
590 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
# Find all releases that are $major.$minor(.$patch)? (no branch versions or rcs)
curl -fs https://raw.githubusercontent.com/erlang/otp/master/otp_versions.table \
| cut -d: -f1 \
| cut -d- -f2 \
| awk '{$1=$1};1' \
| grep -E '^\d+\.\d+(?:\.\d+)?$' \
| sed -E 's/^([0-9]+\.[0-9]+)$/\1.0/g' \
> src/erlang-versions.txt
# Find all releases that are $major.$minor(.$patch)? (no rcs)
curl -fs https://api.github.com/repos/elixir-lang/elixir/releases \
| jq -r '.[].tag_name' \
| sed 's/^v//' \
| grep -v '-' \
> src/elixir-versions.txt