-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
59 lines (51 loc) · 1.44 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
defmodule ParkaLot.Mixfile do
use Mix.Project
def project do
[
app: :park_a_lot,
version: "0.1.0",
elixir: "~> 1.9.4",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
aliases: aliases()
]
|> Keyword.merge(custom_artifacts_directory_opts())
end
def application do
[extra_applications: [:logger], mod: {ParkaLot.Application, []}]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:ace, "~> 0.18.6"},
{:raxx_logger, "~> 0.2.2"},
{:jason, "~> 1.0"},
{:exsync, "~> 0.2.3", only: :dev},
{:postgrex, ">= 0.0.0"},
{:ecto_sql, "~> 3.0.0"}
]
end
defp aliases() do
[
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
# makes sure that if the project is run by docker-compose inside a container,
# its artifacts won't pollute the host's project directory
defp custom_artifacts_directory_opts() do
case System.get_env("MIX_ARTIFACTS_DIRECTORY") do
unset when unset in [nil, ""] ->
[]
directory ->
[
build_path: Path.join(directory, "_build"),
deps_path: Path.join(directory, "deps")
]
end
end
end