Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* gigalixir-20 stack: https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt
* gigalixir-22 stack: https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt
* gigalixir-24 stack: https://builds.hex.pm/builds/otp/ubuntu-24.04/builds.txt
* gigalixir-26 stack: https://builds.hex.pm/builds/otp/ubuntu-26.04/builds.txt
* All other stacks: https://github.com/gigalixir/gigalixir-buildpack-elixir-otp-builds/blob/main/otp-versions
* Elixir - Prebuilt releases (1.0.4, 1.0.3, etc) or prebuilt branches (master, v1.7, etc)
* The full list of releases can be found here: https://github.com/elixir-lang/elixir/releases
Expand Down Expand Up @@ -109,7 +110,7 @@ erlang_version=18.2.1
## Tests

Tests are available in the [test](test) directory.
To run all tests, use `for tst in test/*; do $tst; done`.
To run all tests, use `make test`.


## Credits
Expand Down
7 changes: 7 additions & 0 deletions lib/canonical_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ erlang_builds_url() {
"heroku-24")
erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-24.04"
;;
"heroku-26")
erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-26.04"
;;
*)
erlang_builds_url="https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14"
;;
Expand Down Expand Up @@ -39,6 +42,10 @@ fetch_erlang_versions() {
url="https://builds.hex.pm/builds/otp/ubuntu-24.04/builds.txt"
curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' > /tmp/otp_versions
;;
"heroku-26")
url="https://builds.hex.pm/builds/otp/ubuntu-24.04/builds.txt"
curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' > /tmp/otp_versions
;;
*)
url="https://raw.githubusercontent.com/HashNuke/heroku-buildpack-elixir-otp-builds/master/otp-versions"
curl -s "$url" > /tmp/otp_versions
Expand Down
8 changes: 8 additions & 0 deletions test/erlang_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ suite "erlang_builds_url"
[ "$result" == "https://builds.hex.pm/builds/otp/ubuntu-24.04" ]


test "returns heroku-26 URL"

STACK="heroku-26"
result=$(erlang_builds_url)

[ "$result" == "https://builds.hex.pm/builds/otp/ubuntu-26.04" ]


test "returns cedar-14 URL for unknown stack"

STACK="unknown-stack"
Expand Down
Loading