diff --git a/lib/bob_versions.ex b/lib/bob_versions.ex index 4868548..b6f9f09 100644 --- a/lib/bob_versions.ex +++ b/lib/bob_versions.ex @@ -21,7 +21,7 @@ defmodule BobVersions do @spec get_bob_elixir_builds_file() :: {:ok | :stale, binary} | :error def get_bob_elixir_builds_file do - url = "https://repo.hex.pm/builds/elixir/builds.txt" + url = "https://builds.hex.pm/builds/elixir/builds.txt" BobVersions.EtagCachedResources.resource(url, cache_timeout: @cache_timeout) end @@ -29,12 +29,12 @@ defmodule BobVersions do def get_bob_erlang_builds_file(distro) do url = case distro do - :ubuntu_14 -> "https://repo.hex.pm/builds/otp/ubuntu-14.04/builds.txt" - :ubuntu_16 -> "https://repo.hex.pm/builds/otp/ubuntu-16.04/builds.txt" - :ubuntu_18 -> "https://repo.hex.pm/builds/otp/ubuntu-18.04/builds.txt" - :ubuntu_20 -> "https://repo.hex.pm/builds/otp/ubuntu-20.04/builds.txt" - :ubuntu_22 -> "https://repo.hex.pm/builds/otp/ubuntu-22.04/builds.txt" - :ubuntu_24 -> "https://repo.hex.pm/builds/otp/ubuntu-24.04/builds.txt" + :ubuntu_14 -> "https://builds.hex.pm/builds/otp/ubuntu-14.04/builds.txt" + :ubuntu_16 -> "https://builds.hex.pm/builds/otp/ubuntu-16.04/builds.txt" + :ubuntu_18 -> "https://builds.hex.pm/builds/otp/ubuntu-18.04/builds.txt" + :ubuntu_20 -> "https://builds.hex.pm/builds/otp/ubuntu-20.04/builds.txt" + :ubuntu_22 -> "https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt" + :ubuntu_24 -> "https://builds.hex.pm/builds/otp/ubuntu-24.04/builds.txt" end BobVersions.EtagCachedResources.resource(url, cache_timeout: @cache_timeout) diff --git a/lib/bob_versions/availability/worker.ex b/lib/bob_versions/availability/worker.ex index 0331948..ccc5b93 100644 --- a/lib/bob_versions/availability/worker.ex +++ b/lib/bob_versions/availability/worker.ex @@ -70,7 +70,7 @@ defmodule BobVersions.Availability.Worker do case BobVersions.Http.request(:head, {String.to_charlist(state.url), []}, [], body_format: :binary ) do - {:ok, {{_version, 200, ~c"OK"}, _, _}} -> :available + {:ok, {{_version, 200, ~c"OK"}, _, _}} -> :available _ -> :unavailable end diff --git a/lib/bob_versions/build_setup/elixir.ex b/lib/bob_versions/build_setup/elixir.ex index 90abb0e..a4c0a0f 100644 --- a/lib/bob_versions/build_setup/elixir.ex +++ b/lib/bob_versions/build_setup/elixir.ex @@ -46,6 +46,6 @@ defmodule BobVersions.BuildSetup.Elixir do end def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/elixir/#{branch}.zip" + "https://builds.hex.pm/builds/elixir/#{branch}.zip" end end diff --git a/lib/bob_versions/build_setup/erlang/ubuntu.ex b/lib/bob_versions/build_setup/erlang/ubuntu.ex index 1f0a70f..8bf3ebc 100644 --- a/lib/bob_versions/build_setup/erlang/ubuntu.ex +++ b/lib/bob_versions/build_setup/erlang/ubuntu.ex @@ -7,7 +7,7 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu14 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-14.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-14.04/#{branch}.tar.gz" end end @@ -20,7 +20,7 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu16 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-16.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-16.04/#{branch}.tar.gz" end end @@ -33,7 +33,7 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu18 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-18.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-18.04/#{branch}.tar.gz" end end @@ -46,7 +46,7 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu20 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-20.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-20.04/#{branch}.tar.gz" end end @@ -59,7 +59,7 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu22 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-22.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-22.04/#{branch}.tar.gz" end end @@ -72,6 +72,6 @@ defmodule BobVersions.BuildSetup.Erlang.Ubuntu24 do defdelegate github_ref_url(ref), to: BobVersions.BuildSetup.Erlang def hex_pm_download_url(branch) do - "https://repo.hex.pm/builds/otp/ubuntu-24.04/#{branch}.tar.gz" + "https://builds.hex.pm/builds/otp/ubuntu-24.04/#{branch}.tar.gz" end end diff --git a/lib/bob_versions/etag_cached_resources.ex b/lib/bob_versions/etag_cached_resources.ex index aa7320e..bb0bf9d 100644 --- a/lib/bob_versions/etag_cached_resources.ex +++ b/lib/bob_versions/etag_cached_resources.ex @@ -6,7 +6,7 @@ defmodule BobVersions.EtagCachedResources do ## Usage {:ok, pid} = BobVersions.EtagCachedResources.start_link() - url = "https://repo.hex.pm/builds/elixir/builds.txt" + url = "https://builds.hex.pm/builds/elixir/builds.txt" # Downloads resource {:ok, _} = BobVersions.EtagCachedResources.resource(url) # Serves cached content diff --git a/test/bob_versions/bob_versions_test.exs b/test/bob_versions/bob_versions_test.exs index 1532c5d..9215e6f 100644 --- a/test/bob_versions/bob_versions_test.exs +++ b/test/bob_versions/bob_versions_test.exs @@ -23,7 +23,7 @@ defmodule BobVersionsTest do %{ availability: :undetermined, checksum: "", - download: "https://repo.hex.pm/builds/elixir/v0.12.4.zip", + download: "https://builds.hex.pm/builds/elixir/v0.12.4.zip", git: %{ sha: "543dfdeac80cfaf3483927c189cf9974f1e361eb", url: @@ -46,7 +46,7 @@ defmodule BobVersionsTest do %{ availability: :undetermined, checksum: "", - download: "https://repo.hex.pm/builds/elixir/v0.12.5.zip", + download: "https://builds.hex.pm/builds/elixir/v0.12.5.zip", git: %{ sha: "b07fbcf8b73e9353cc336107050a8aac5fdabd11", url: @@ -71,7 +71,7 @@ defmodule BobVersionsTest do %{ availability: :undetermined, checksum: "", - download: "https://repo.hex.pm/builds/elixir/v0.13.0.zip", + download: "https://builds.hex.pm/builds/elixir/v0.13.0.zip", git: %{ sha: "ada53524caa6ea27ffaa1a373f5c86bd6cadb0d5", url: @@ -110,7 +110,7 @@ defmodule BobVersionsTest do availability: :undetermined, checksum: "950f5a6784cb556199797c6f7f0205db5c17dbbf1a7ce0aabdf575429c16c89c", - download: "https://repo.hex.pm/builds/elixir/v0.12.4.zip", + download: "https://builds.hex.pm/builds/elixir/v0.12.4.zip", git: %{ sha: "543dfdeac80cfaf3483927c189cf9974f1e361eb", url: @@ -134,7 +134,7 @@ defmodule BobVersionsTest do availability: :undetermined, checksum: "d11c2d82a603a1362797a181dd8c8a2a5d6d9c6e5e54cfb03e8cb96443b91828", - download: "https://repo.hex.pm/builds/elixir/v0.12.5.zip", + download: "https://builds.hex.pm/builds/elixir/v0.12.5.zip", git: %{ sha: "b07fbcf8b73e9353cc336107050a8aac5fdabd11", url: @@ -187,7 +187,7 @@ defmodule BobVersionsTest do %{ availability: :undetermined, checksum: "", - download: "https://repo.hex.pm/builds/otp/ubuntu-14.04/OTP-19.2.tar.gz", + download: "https://builds.hex.pm/builds/otp/ubuntu-14.04/OTP-19.2.tar.gz", git: %{ sha: "3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f", url: @@ -211,7 +211,7 @@ defmodule BobVersionsTest do availability: :undetermined, checksum: "", download: - "https://repo.hex.pm/builds/otp/ubuntu-14.04/OTP-19.3.6.9.tar.gz", + "https://builds.hex.pm/builds/otp/ubuntu-14.04/OTP-19.3.6.9.tar.gz", git: %{ sha: "3d0c4930775cf2ab304d5e4701b41ffc2936ce53", url: @@ -236,7 +236,7 @@ defmodule BobVersionsTest do %{ availability: :undetermined, checksum: "", - download: "https://repo.hex.pm/builds/otp/ubuntu-14.04/OTP-20.0.tar.gz", + download: "https://builds.hex.pm/builds/otp/ubuntu-14.04/OTP-20.0.tar.gz", git: %{ sha: "040bdce67f88d833bfb59adae130a4ffb4c180f0", url: