summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Meadows-Jönsson <eric.meadows.jonsson@gmail.com>2023-04-30 19:29:52 +0100
committerGitHub <noreply@github.com>2023-04-30 20:29:52 +0200
commite0d251c50f569eb510f106c3242cb519076b0fc3 (patch)
tree0004965def53e8178f677d4aa6e82908319f0287
parentaecd523c395d3508e52e7dff0afe589fb93e07d9 (diff)
downloadelixir-e0d251c50f569eb510f106c3242cb519076b0fc3.tar.gz
Use new domain repo.hex.pm => builds.hex.pm (#12540)
* repo.hex.pm => builds.hex.pm * HEX_MIRROR => HEX_BUILDS_URL
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/mix/lib/mix/hex.ex8
-rw-r--r--lib/mix/lib/mix/local.ex2
-rw-r--r--lib/mix/lib/mix/tasks/local.hex.ex10
-rw-r--r--lib/mix/lib/mix/tasks/local.rebar.ex10
5 files changed, 16 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c460d24d..02bda9bb4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -182,6 +182,7 @@ TODO: Mention :console vs Logger.Backends.Console
* [Mix.Project] `:preferred_cli_env` is deprecated in favor of `:preferred_envs` in `def cli`
* [Mix.Project] `:preferred_cli_target` is deprecated in favor of `:preferred_targets` in `def cli`
+ * [mix local] The environment variable `HEX_MIRROR` is deprecated in favor of `HEX_BUILDS_URL`
### 4. Hard deprecations
diff --git a/lib/mix/lib/mix/hex.ex b/lib/mix/lib/mix/hex.ex
index d43c60f52..7b294de07 100644
--- a/lib/mix/lib/mix/hex.ex
+++ b/lib/mix/lib/mix/hex.ex
@@ -2,7 +2,7 @@ defmodule Mix.Hex do
@moduledoc false
@compile {:no_warn_undefined, Hex}
@hex_requirement ">= 0.19.0"
- @hex_mirror "https://repo.hex.pm"
+ @hex_builds_url "https://builds.hex.pm"
@doc """
Returns `true` if `Hex` is loaded or installed.
@@ -70,9 +70,9 @@ defmodule Mix.Hex do
end
@doc """
- Returns the URL to the Hex mirror.
+ Returns the URL to the Hex build assets.
"""
- def mirror do
- System.get_env("HEX_MIRROR") || @hex_mirror
+ def url do
+ System.get_env("HEX_BUILDS_URL") || System.get_env("HEX_MIRROR") || @hex_builds_url
end
end
diff --git a/lib/mix/lib/mix/local.ex b/lib/mix/lib/mix/local.ex
index 6e4af8bf7..2abcb8a83 100644
--- a/lib/mix/lib/mix/local.ex
+++ b/lib/mix/lib/mix/local.ex
@@ -1,7 +1,7 @@
defmodule Mix.Local do
@moduledoc false
- @public_keys_html "https://repo.hex.pm/installs/public_keys.html"
+ @public_keys_html "https://builds.hex.pm/installs/public_keys.html"
@in_memory_key """
-----BEGIN PUBLIC KEY-----
diff --git a/lib/mix/lib/mix/tasks/local.hex.ex b/lib/mix/lib/mix/tasks/local.hex.ex
index d81d48cd2..2d43db675 100644
--- a/lib/mix/lib/mix/tasks/local.hex.ex
+++ b/lib/mix/lib/mix/tasks/local.hex.ex
@@ -33,8 +33,8 @@ defmodule Mix.Tasks.Local.Hex do
## Mirrors
- If you want to change the [default mirror](https://repo.hex.pm)
- used for fetching Hex, set the `HEX_MIRROR` environment variable.
+ If you want to change the [default mirror](https://builds.hex.pm)
+ used for fetching Hex, set the `HEX_BUILDS_URL` environment variable.
"""
@switches [if_missing: :boolean, force: :boolean]
@@ -66,17 +66,17 @@ defmodule Mix.Tasks.Local.Hex do
end
defp run_install(version, argv) do
- hex_mirror = Mix.Hex.mirror()
+ hex_url = Mix.Hex.url()
{elixir_version, hex_version, sha512} =
Mix.Local.find_matching_versions_from_signed_csv!(
"Hex",
version,
- hex_mirror <> @hex_list_path
+ hex_url <> @hex_list_path
)
url =
- (hex_mirror <> @hex_archive_path)
+ (hex_url <> @hex_archive_path)
|> String.replace("[ELIXIR_VERSION]", elixir_version)
|> String.replace("[HEX_VERSION]", hex_version)
diff --git a/lib/mix/lib/mix/tasks/local.rebar.ex b/lib/mix/lib/mix/tasks/local.rebar.ex
index e72f05789..255ac4b9c 100644
--- a/lib/mix/lib/mix/tasks/local.rebar.ex
+++ b/lib/mix/lib/mix/tasks/local.rebar.ex
@@ -34,8 +34,8 @@ defmodule Mix.Tasks.Local.Rebar do
## Mirrors
- If you want to change the [default mirror](https://repo.hex.pm)
- to use for fetching `rebar` please set the `HEX_MIRROR` environment variable.
+ If you want to change the [default mirror](https://builds.hex.pm)
+ to use for fetching `rebar` please set the `HEX_BUILDS_URL` environment variable.
"""
@switches [force: :boolean, sha512: :string, if_missing: :boolean]
@@ -107,14 +107,14 @@ defmodule Mix.Tasks.Local.Rebar do
end
defp install_from_s3(manager, list_url, escript_url, opts) do
- hex_mirror = Mix.Hex.mirror()
- list_url = hex_mirror <> list_url
+ hex_url = Mix.Hex.url()
+ list_url = hex_url <> list_url
{elixir_version, rebar_version, sha512} =
Mix.Local.find_matching_versions_from_signed_csv!("Rebar", _version = nil, list_url)
url =
- (hex_mirror <> escript_url)
+ (hex_url <> escript_url)
|> String.replace("[ELIXIR_VERSION]", elixir_version)
|> String.replace("[REBAR_VERSION]", rebar_version)