Optional deps

This commit is contained in:
Mayel de Borniol 2024-04-01 15:35:39 +01:00
parent 2c66528aa5
commit 5a6a6b7fa6

19
mix.exs
View file

@ -128,13 +128,20 @@ defmodule Bonfire.Umbrella.MixProject do
@extra_release_apps @deps
|> Enum.filter(fn
{_dep, opts} when is_list(opts) -> opts[:runtime]==false and (is_nil(opts[:only]) or :prod in List.wrap(opts[:only]))
{_dep, _, opts} -> opts[:runtime]==false and (is_nil(opts[:only]) or :prod in List.wrap(opts[:only]))
_ -> false
{_dep, opts} when is_list(opts) ->
opts[:runtime] == false and
(is_nil(opts[:only]) or :prod in List.wrap(opts[:only]))
{_dep, _, opts} ->
opts[:runtime] == false and
(is_nil(opts[:only]) or :prod in List.wrap(opts[:only]))
_ ->
false
end)
# Mixer.other_flavour_sources()
|> Mixer.deps_names_list()
|> Enum.map(& {&1, :load})
|> Enum.map(&{&1, :load})
|> IO.inspect(label: "extensions to include in release")
# TODO: put these in ENV or an external writeable config file similar to deps.*
@ -240,7 +247,6 @@ defmodule Bonfire.Umbrella.MixProject do
def config, do: @config
def deps, do: config()[:deps]
def project do
[
app: :bonfire_umbrella,
@ -266,7 +272,8 @@ defmodule Bonfire.Umbrella.MixProject do
runtime_config_path: Mixer.config_path("runtime.exs"),
# should BEAM files should have their debug information, documentation chunks, and other non-essential metadata?
strip_beams: false,
applications: [
applications:
[
bonfire: :permanent,
# if observability fails it shouldnt take your app down with it
opentelemetry_exporter: :temporary,