Skip to content

Commit b24e9f2

Browse files
committed
Include certifi as optional dep, closes #78
1 parent c98b0df commit b24e9f2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/elixir_make/artefact.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ defmodule ElixirMake.Artefact do
215215
def download(url) do
216216
url_charlist = String.to_charlist(url)
217217

218+
# TODO: Remove me when we require Elixir v1.15
218219
{:ok, _} = Application.ensure_all_started(:inets)
219220
{:ok, _} = Application.ensure_all_started(:ssl)
220221
{:ok, _} = Application.ensure_all_started(:public_key)
@@ -260,15 +261,15 @@ defmodule ElixirMake.Artefact do
260261
path = System.get_env("ELIXIR_MAKE_CACERT") ->
261262
[cacertfile: path]
262263

264+
certs = otp_cacerts() ->
265+
[cacerts: certs]
266+
263267
Application.spec(:castore, :vsn) ->
264268
[cacertfile: Application.app_dir(:castore, "priv/cacerts.pem")]
265269

266270
Application.spec(:certifi, :vsn) ->
267271
[cacertfile: Application.app_dir(:certifi, "priv/cacerts.pem")]
268272

269-
certs = otp_cacerts() ->
270-
[cacerts: certs]
271-
272273
path = cacerts_from_os() ->
273274
[cacertfile: path]
274275

mix.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ defmodule ElixirMake.Mixfile do
2323
defp deps do
2424
[
2525
{:castore, "~> 0.1 or ~> 1.0", optional: true},
26+
{:certifi, "~> 2.0", optional: true},
2627
{:ex_doc, "~> 0.20", only: :docs}
2728
]
2829
end

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
%{
22
"castore": {:hex, :castore, "1.0.0", "c25cd0794c054ebe6908a86820c8b92b5695814479ec95eeff35192720b71eec", [:mix], [], "hexpm", "577d0e855983a97ca1dfa33cbb8a3b6ece6767397ffb4861514343b078fc284b"},
3+
"certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"},
34
"earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"},
45
"ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"},
56
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},

0 commit comments

Comments
 (0)