-
Notifications
You must be signed in to change notification settings - Fork 7
/
mix.exs
160 lines (146 loc) · 5.13 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
defmodule Console.MixProject do
use Mix.Project
defp version do
case :file.consult('hex_metadata.config') do
{:ok, data} ->
{"version", version} = List.keyfind(data, "version", 0)
version
_ ->
version =
case System.cmd("git", ~w[describe --dirty=+dirty]) do
{version, 0} ->
String.trim_leading(String.trim(version), "v")
{_, code} ->
Mix.shell().error("Git exited with code #{code}, falling back to 0.0.0")
"0.0.0"
end
case Version.parse(version) do
{:ok, %Version{pre: ["pre" <> _ | _]} = version} ->
to_string(version)
{:ok, %Version{pre: []} = version} ->
to_string(version)
{:ok, %Version{patch: patch, pre: pre} = version} ->
to_string(%{version | patch: patch + 1, pre: ["dev" | pre]})
:error ->
Mix.shell().error("Failed to parse #{version}, falling back to 0.0.0")
"0.0.0"
end
end
end
def project do
[
app: :console,
version: version(),
build_path: "_build",
config_path: "config/config.exs",
deps_path: "deps",
lockfile: "mix.lock",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {Console.Application, []},
extra_applications: [:logger, :runtime_tools, :ssh]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ecto, "~> 3.9.0", override: true},
{:ex_machina, "~> 2.3", only: :test},
{:distillery, "~> 2.1"},
{:libcluster, "~> 3.2"},
{:horde, "~> 0.8"},
{:crontab, "~> 1.1"},
{:tentacat, "~> 2.0"},
{:absinthe_client, "~> 0.1.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix, "~> 1.5"},
{:phoenix_view, "~> 2.0"},
{:openid_connect, "~> 0.2.2", git: "https://github.com/pluralsh/openid_connect", commit: "c3b2701b9adbe01fd89bbd09816ffa6c9e4a825e"},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_ecto, "~>4.0"},
{:ecto_sql, "~> 3.10.0"},
{:yajwt, "~> 1.4"},
{:joken, "~> 2.6"},
{:piazza_core, "~> 0.3.8", git: "https://github.com/michaeljguarino/piazza_core"},
{:flow, "~> 0.15.0"},
{:bourne, "~> 1.1"},
{:phoenix_html, "~> 2.11"},
{:parallel_task, "~> 0.1.0"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:uniq, "~> 0.4"},
{:mix_audit, "~> 2.0", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.8", only: [:dev, :test]},
{:porcelain, "~> 2.0"},
{:absinthe, "~> 1.7.5"},
{:absinthe_relay, "~> 1.5.2"},
{:absinthe_plug, "~> 1.5"},
{:absinthe_phoenix, "~> 2.0"},
{:dataloader, "~> 1.0.6"},
{:cors_plug, "~> 2.0"},
{:timex, "~> 3.7"},
{:quantum, "~> 3.0"},
{:swarm, "~> 3.0"},
{:bandit, "~> 1.0"},
{:yaml_elixir, "~> 2.9"},
{:poison, "~> 5.0", override: true},
{:ets, "~> 0.9"},
{:reverse_proxy_plug, "~> 1.2.1"},
{:kazan, "~> 0.11", github: "michaeljguarino/kazan", ref: "ef2050c547ab74c283ef02397925d48637bd67a1"},
{:comeonin, "~> 5.1.2"},
{:argon2_elixir, "~> 2.0"},
{:prometheus_ex, "~> 3.0"},
{:prometheus_plugs, "~> 1.1.1"},
{:prometheus_ecto, "~> 1.4.3"},
{:guardian, "~> 1.2.1"},
{:httpoison, "~> 1.7", override: true},
{:nebulex, "~> 2.6"},
{:shards, "~> 1.0"}, #=> For using :shards as backend
{:decorator, "~> 1.3"}, #=> For using Caching Annotations
{:telemetry, "~> 0.4"},
{:apq, "~> 1.2"},
{:evel, "~> 0.1"},
{:deep_merge, "~> 1.0"},
{:ymlr, "~> 2.0"},
{:remote_ip, "~> 0.2.0"},
{:erlsom, "~> 1.4"},
{:inflex, "~> 2.0.0"},
{:websockex, "~> 0.4.3"},
{:briefly, "~> 0.5.0"},
{:libring, "~> 1.0"},
{:http_stream, "~> 1.0.0"},
{:solid, "~> 0.15"},
{:x509, "~> 0.8.5"},
# if using the Mint adapter:
{:castore, "~> 0.1.7"},
{:req, "~> 0.4.14", override: true},
{:mint, "~> 1.4.0", override: true},
{:phoenix_client, "~> 0.11", git: "https://github.com/michaeljguarino/phoenix_client.git", branch: "mguarino/channel-listen"},
{:botanist, "~> 0.1.0", git: "https://github.com/michaeljguarino/botanist.git", branch: "ecto3"},
{:elixpath, "~> 0.1.1", git: "https://github.com/mtannaan/elixpath.git"},
{:mimic, "~> 1.1", only: :test},
{:hammer, "~> 6.0"},
{:hammer_plug, "~> 3.0", git: "https://github.com/pluralsh/hammer-plug.git", branch: "runtime-config"}
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
end