-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
102 lines (91 loc) · 3.17 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Code.eval_file("mess.exs", (if File.exists?("../../lib/mix/mess.exs"), do: "../../lib/mix/"))
defmodule Bonfire.MixProject do
use Mix.Project
@in_umbrella? File.exists?("../../lib/mix/mess.exs")
@config_path "../../config/"
@umbrella_mess_defs if @in_umbrella?, do: "#{@config_path}deps.flavour", else: "../../deps.flavour"
def project do
if System.get_env("AS_UMBRELLA") == "1" do
[
build_path: "../../_build",
config_path: "#{@config_path}config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock"
]
else
[]
end
++
[
app: :bonfire,
version: "0.1.0-beta.4",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {Bonfire.Application, []},
extra_applications: [
:logger,
:runtime_tools,
:os_mon,
:ssl,
:bamboo,
:bamboo_smtp
]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
with_git? = System.get_env("WITH_GIT_DEPS", "1")=="1"
maybe_git = if with_git?, do: [git: "deps.git"], else: []
spark_sources = [path: "deps.path"] ++ maybe_git ++ [hex: "deps.hex"]
maybe_git = if with_git?, do: [git: "#{@umbrella_mess_defs}.git"], else: []
Mess.deps((if System.get_env("WITH_FORKS", "1")=="1" do
spark_sources ++
[path: "#{@umbrella_mess_defs}.path"] ++
maybe_git ++
[hex: "#{@umbrella_mess_defs}.hex"]
else
spark_sources ++
maybe_git ++ [hex: "#{@umbrella_mess_defs}.hex"]
end),
if(System.get_env("AS_DESKTOP_WEBAPP") in ["1", "true"], do: [
{:elixirkit, git: "https://github.com/livebook-dev/livebook", sparse: "elixirkit"}
], else: []) ++
if(System.get_env("AS_DESKTOP_APP") in ["1", "true"], do: [
{:desktop, github: "elixir-desktop/desktop"}
], else: []) ++
if(System.get_env("WITH_API_GRAPHQL")== "yes", do: [
{:absinthe, "~> 1.7"},
{:bonfire_api_graphql,
git: "https://github.com/bonfire-networks/bonfire_api_graphql"},
{:absinthe_client,
git: "https://github.com/bonfire-networks/absinthe_client"}
], else: []) ++ [
{:voodoo, git: "https://github.com/bonfire-networks/voodoo"},
{:finch, "~> 0.16"},
# {:tz, "~> 0.26.2"},
{:bonfire_ui_me, git: "https://github.com/bonfire-networks/bonfire_ui_me", optional: true},
# tests
{:mneme, ">= 0.0.0", only: [:dev, :test]},
# error reporting
{:sentry, "~> 10.0", optional: true},
{:orion, "~> 1.0.5"},
# {:live_admin, #"~> 0.12.0"
# git: "https://github.com/bonfire-networks/live_admin"
# },
# API
# {:exonerate, "~> 1.1.3", runtime: Mix.env() != :prod},
# {:yaml_elixir, "~> 2.9"},
## dev conveniences
{:phoenix_live_reload, "~> 1.3", optional: true},
{:pbkdf2_elixir, "~> 2.0", optional: true}
])
|> Enum.reject(& elem(&1, 0)==:bonfire)
# |> IO.inspect
end
end