-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
61 lines (54 loc) · 1.12 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
defmodule Clei.MixProject do
use Mix.Project
def project do
[
app: :clei,
version: File.read!("VERSION"),
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
releases: releases(),
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger],
mod: {Clei.Application, []}
]
end
defp deps do
external_plugins() ++
local_plugins() ++
[
{:plug_cowboy, "~> 2.5"},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false}
]
end
def local_plugins do
Path.wildcard("plugins/*")
|> Enum.map(fn dir -> {Path.basename(dir) |> String.to_atom(), path: dir} end)
end
def external_plugins do
{deps, _} = Code.eval_file("plugins.exs")
deps
end
def releases do
[
clei: [
include_executables_for: [:unix],
applications: [clei: :permanent]
]
]
end
def aliases do
[
setup: [
"local.hex --if-missing --force",
"local.rebar --if-missing --force",
"deps.get",
"deps.compile"
]
]
end
end