-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
91 lines (80 loc) · 2.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
defmodule EctoTemp.MixProject do
use Mix.Project
def application, do: [extra_applications: [:logger]]
def project do
[
app: :ecto_temp,
deps: deps(),
description: description(),
dialyzer: dialyzer(),
docs: docs(),
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
preferred_cli_env: [credo: :test, dialyzer: :test],
source_url: "https://github.com/synchronal/ecto_temp",
start_permanent: Mix.env() == :prod,
version: version()
]
end
def cli,
do: [
preferred_envs: [credo: :test, dialyzer: :test]
]
# # #
defp deps,
do: [
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ecto, ">= 3.0.0"},
{:ecto_sql, "> 3.0.0"},
{:ex_doc, "~> 0.28", only: [:docs, :dev]},
{:markdown_formatter, "~> 1.0", only: :dev, runtime: false},
{:mix_audit, "~> 2.0", only: :dev, runtime: false},
{:postgrex, ">= 0.0.0", only: :test}
]
defp description(),
do: "Tools for using Postgres temporary tables with Ecto"
defp dialyzer do
[
plt_add_apps: [:ex_unit, :mix],
plt_add_deps: :app_tree,
plt_core_path: "_build/plts/#{Mix.env()}",
plt_local_path: "_build/plts/#{Mix.env()}"
]
end
defp docs do
[
extras: [
"guides/overview.md",
"guides/data_migrations.md",
"CHANGELOG.md",
"LICENSE.md"
],
main: "overview"
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package(),
do: [
files: ~w[
.formatter.exs
CHANGELOG.*
LICENSE.*
README.*
VERSION
lib
mix.exs
],
licenses: ["Apache-2.0"],
maintainers: ["Eric Saxby"],
links: %{github: "https://github.com/synchronal/ecto_temp"}
]
defp version do
case Path.expand(Path.join([__ENV__.file, "..", "VERSION"])) |> File.read() do
{:error, _} -> "0.0.0"
{:ok, version_number} -> version_number |> String.trim()
end
end
end