-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
75 lines (66 loc) · 1.67 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
defmodule EctoClone.MixProject do
use Mix.Project
@version "0.2.0"
@description "Leverage Ecto associations to deep clone db records & do other helpful stuff"
@source_url "https://github.com/grantwest/ecto_clone"
def project do
[
app: :ecto_clone,
version: @version,
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
description: @description,
aliases: aliases(),
preferred_cli_env: [
"test.watch": :test
],
name: "EctoClone",
docs: docs()
]
end
def application do
always = [
extra_applications: [:logger]
]
case Mix.env() do
:test -> always ++ [mod: {EctoClone.Test.Application, []}]
_ -> always
end
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:ecto, ">= 3.9.0"},
{:ecto_sql, ">= 3.9.0", only: [:test]},
{:postgrex, ">= 0.16.0", only: [:test]},
{:mix_test_watch, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.27", only: :dev, runtime: false}
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
]
end
defp package do
%{
licenses: ["0BSD"],
maintainers: ["Grant West"],
links: %{"GitHub" => @source_url}
}
end
defp docs do
[
source_ref: "v#{@version}",
source_url: @source_url,
extras: ["README.md"],
main: "readme"
]
end
end