forked from noxdafox/rabbitmq-message-deduplication
-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
71 lines (65 loc) · 1.31 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
defmodule RabbitMQ.MessageDeduplicationPlugin.Mixfile do
use Mix.Project
def project do
deps_dir = case System.get_env("DEPS_DIR") do
nil -> "deps"
dir -> dir
end
[
app: :rabbitmq_message_deduplication,
version: "0.5.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps_path: deps_dir,
deps: deps(deps_dir),
aliases: aliases()
]
end
def application do
applications = case Mix.env do
:test -> [:mnesia]
_ -> [:rabbit, :mnesia]
end
[
applications: applications,
mod: {RabbitMQMessageDeduplication, []}
]
end
defp deps(deps_dir) do
[
{
:rabbit,
path: Path.join(deps_dir, "rabbit"),
compile: "true",
override: true
},
{
:rabbit_common,
path: Path.join(deps_dir, "rabbit_common"),
compile: "true",
override: true
}
]
end
defp aliases do
[
# Do not start the application during unit tests
test: "test --no-start",
make_deps: [
"deps.get",
"deps.compile"
],
make_app: [
"compile"
],
make_all: [
"deps.get",
"deps.compile",
"compile"
],
make_tests: [
"test"
]
]
end
end