From 7c053a63e3b250f26bca4ff3d877218693b00eba Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 3 Oct 2022 10:41:07 +0200 Subject: [PATCH 1/3] Add support for Scalingo-20 --- README.md | 2 +- lib/canonical_version.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d9e40ca..13a3149 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ * Erlang - Prebuilt packages (17.5, 17.4, etc) * The full list of prebuilt packages can be found here: - * gigalixir-20 or heroku-20 stacks: https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt + * gigalixir-20, heroku-20 or scalingo-20 stacks: https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt * heroku-22 stacks: https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt * All other stacks: https://github.com/HashNuke/heroku-buildpack-elixir-otp-builds/blob/master/otp-versions * Elixir - Prebuilt releases (1.0.4, 1.0.3, etc) or prebuilt branches (master, v1.7, etc) diff --git a/lib/canonical_version.sh b/lib/canonical_version.sh index 7b4a538..3dbedae 100755 --- a/lib/canonical_version.sh +++ b/lib/canonical_version.sh @@ -8,6 +8,9 @@ erlang_builds_url() { "heroku-22") erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-22.04" ;; + "scalingo-20") + erlang_builds_url="https://repo.hex.pm/builds/otp/ubuntu-20.04" + ;; *) erlang_builds_url="https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14" ;; @@ -26,6 +29,10 @@ fetch_erlang_versions() { url="https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt" curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' ;; + "scalingo-20") + url="https://repo.hex.pm/builds/otp/ubuntu-20.04/builds.txt" + curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' + ;; "heroku-22") url="https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt" curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' From cf6fd150bb657484ce2bfc5229bde196c56a762b Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 3 Jul 2023 14:12:37 +0200 Subject: [PATCH 2/3] [Chore] Add support for stack scalingo-22 --- lib/canonical_version.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/canonical_version.sh b/lib/canonical_version.sh index 3dbedae..3a7c64b 100755 --- a/lib/canonical_version.sh +++ b/lib/canonical_version.sh @@ -9,7 +9,10 @@ erlang_builds_url() { erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-22.04" ;; "scalingo-20") - erlang_builds_url="https://repo.hex.pm/builds/otp/ubuntu-20.04" + erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-20.04" + ;; + "scalingo-22") + erlang_builds_url="https://builds.hex.pm/builds/otp/ubuntu-22.04" ;; *) erlang_builds_url="https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14" From 41a4eccbef7fb9cc9f47591e24207978a665f9b0 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Tue, 4 Jul 2023 14:38:23 +0200 Subject: [PATCH 3/3] [Chore] Use builds.hex.pm as new new base url for scalingo as well --- lib/canonical_version.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/canonical_version.sh b/lib/canonical_version.sh index 3a7c64b..5e79128 100755 --- a/lib/canonical_version.sh +++ b/lib/canonical_version.sh @@ -33,7 +33,11 @@ fetch_erlang_versions() { curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' ;; "scalingo-20") - url="https://repo.hex.pm/builds/otp/ubuntu-20.04/builds.txt" + url="https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt" + curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' + ;; + "scalingo-22") + url="https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt" curl -s "$url" | awk '/^OTP-([0-9.]+ )/ {print substr($1,5)}' ;; "heroku-22")